Re: deSubgraphKit bug: unscope can specify temps (please confirm)
Mark Miller <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
On Sun, May 31, 2009 at 7:58 AM, Kevin Reid <[email protected]> wrote: > If the provided unscope contains an integer, it is interpreted as > specifying a temp in the graph being serialized. This seems like a > POLA violation to me, as well as an undesirable type-unsafety. > > ? def deSubgraphKit := <elib:serial.deSubgraphKit> > # value: <deSubgraphKit> > > ? deSubgraphKit \ > > .makeRecognizer(null, ["a" => 0, __makeList => "__makeList"]) \ > > .recognize([["foo", "foo"], "a"], > > deSubgraphKit.makeBuilder([=> __makeList])) > # value: [["foo", "foo"], <***CYCLE***>] > > Note that in the general case, the unscope can designate objects it > does not itself have access to. > > If it is agreed that this is a bug, Yes, this is a bug. > I will revise generate(obj) in > deSubgraphKit to throw if the unscope value is not a string. Thanks! -- Text by me above is hereby placed in the public domain Cheers, --MarkM