|
|
||
|
HyperHacker wrote:
It seems that Mr. Manura is the only one who has really thought this whole problem through to it's logical end.On 2010-07-09, Matthew Wild <mwild1@gmail.com> wrote:On 9 July 2010 14:18, steve donovan <steve.j.donovan@gmail.com> wrote:On Fri, Jul 9, 2010 at 1:49 PM, Antonio Vieiro <antonio@antonioshome.net> wrote: "This mess, and numerous ways to shoot yourself in the foot, suggests rewriting everything above without environments/globals but rather a straightforward lexical scoping solution that "just works". In addition to a number of messes that he referred to earlier in his post, we had people who wanted to do things by line numbers (back to the original BASIC), people who wanted to use various explicit searches to build tables that then had to be edited and that didn't work in all cases, and etc...ugh. There were those who compared the problems with global by default to those of local by default. Problems with a local variable, in the absence of globals, can be found within the bounds of a contiguous piece of code, where globals cause one to search through every global in every piece of code related to the current one by one of a dozen techniques. This is madness. Such a search may generate a list of globals, one or none of which may actually be related to the problem being experienced. People have a habit of having various standard libraries around, whether they are actually using them or not. It makes sense to do so, as it is a pain to have to bring a library into referenceable scope only when you intend to use it at that particular moment. If external variables only become available in a particular piece of code by explicit reference or inclusion, even if that reference or inclusion drags with it a whole set of variables, then there can be no confusion as to the current scope of a variable or to what it refers. If all this language is to be used for is short macros or interactive code, then it really does not matter what is done, but if it is to be useable for major development projects, it needs to be cleanly constructed. I am not sure that something like lua can be fully statically analyzed, but the rule structure for variable reference can certainly be made much simpler and more likely to yield to simpler analysis than is now necessary. Everett L.(Rett) Williams II |