[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: tag methods question
- From: Edgar Toernig <froese@...>
- Date: Mon, 25 Sep 2000 23:57:17 +0200
Roberto Ierusalimschy wrote:
> I wrote:
> > I have to agree. set/getglobal tag methods should be removed just like
> > foreachvar and all the other *global functions. They are all just special
> > cases of the appropriate table functions.
>
> set/getglobal tag methods act differently from gettable/settable methods.
Yes, I know.
> The later act based on the table tag, while the former act based on the
> value tag. With gettable/settable methods, we would have only one tag
> method for all globals: the method set for the table of globals. With
> set/getglobal tag methods, we can have different methods for different
> kinds of globals.
And this can be easily implemented using set/gettable on the global
array. Btw, that's an additional difference: set/getglobal act an
all global-arrays, whereas set/gettable may be different for
different global tables.
> Most of our uses of tag methods for globals (detecting non-declared
> globals, tracing global assignments, detecting function redefinitions,
> etc.) set these methods for only one (or a few) tag.
Just say debugging ;) IMHO, all _other_ uses are only obscure magic.
Ciao, ET.