[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MAGIC? - no aberration



    From: Drew McDermott <Mcdermott>
    Re:   magic? aberration

    ...  E.g., a list of objects cannot be stepped
    through if it has a magic element.  All magic objects will behave like the
    "unbound object" in ILISP....

Sorry, you got it all wrong.  My explanations must be much more opaque
than I imagine when I write them.  Magic objects ARE normal things.
There's no problem setting (interpreter) variables to them, stepping
through lists of them, or doing anything else to them; there's nothing
"magical" about them at all.  The only funniness is the way in which
they are associated (bound) with identifiers.  In effect, the variable's
"value cell" has, in addition to its value slot, a flag (bit) which says
whether or not there's a value there.  If there's no value there, we can
use the value slot to hold any interesting object we want, for example a
"magic object".  Magic objects do NOT look like "unbound things"; you
can pass them around with impunity.  No such illegal "unbound objects"
exist.

(As I hinted in a previous message, the implementation doesn't actually
go like this; but it might as well.)

I hope that with this reassurance I don't need to argue against your
proposal, which completely goes against the grain of T, where things
don't know and don't care about their names, except for debugging
purposes.  I don't understand what awkwardness you refer too, unless
it's the need for extra special forms for fetching and setting the
"magic bindings" of variables (i.e., hacking the values as usual,
but forcing the has-value bit the wrong way); I think this is a
reasonable price to pay.