lua-users home
lua-l archive

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


It was thus said that the Great Sir Pogsalot once stated:
> I want to thank Petite Abeille for being the most contributory, the 2nd
> approach was creative.  I would probably stick with the from() I posted,
> but I thought your code was really thought-provoking and I appreciate you
> putting more code to this thread. :]
> 
> Most of the replies boil down to:
> 4) have an external script generate the 'local a = mod.a' list
> 
> My response:
> 4) Running an external script to generate the preamble sounds trendy...

  Trendy?  As far as I know, I'm the first to suggest that, in this thread,
and I've seen this topic come up a few times before.  How is this trendy? 
In my opinion, changing the semantics of the language is the "trendy" thing
to do (since it keeps coming up over and over again).

> The problem is these local lines.  I see a lot of them and they're not
> easy to 'skim'.  It makes it difficult to review others' code if you're
> making sure they use everything they've referenced.

  Again, there are tools to check for unused variables.  

> Things to remember:
> - I'm trying to avoid messing with _ENV
> - I'm trying to create locals in batch
> - I want to create locals [not globals!!!] with import()
> - I want the ability to provide a prefix to the generated local identifiers
> - I want to be able to specify a list of what to localize from the table

  And again, how does the script not provide all those?  Why *MUST* this be
in the language?

  -spc