[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: tag methods question
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 25 Sep 2000 14:12:35 -0300
> 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.
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.
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.