[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion for 5.3: import() for creating a "slew" of locals
- From: Sean Conner <sean@...>
- Date: Tue, 19 Nov 2013 13:08:08 -0500
It was thus said that the Great Sir Pogsalot once stated:
>
> 2) I don't agree with Sean's advice to use my text editor or an external
> preprocessor to generate the list of local declarations. Yes that saves
> keystrokes, but I'm moreso trying to reduce the complexity of *reading*
> that list than writing it. I think import(os) & import(table, { 'insert',
> 'remove', 'unpack' }, 't') & import(string, { 'byte', 'char', 'find',
> 'format', 'rep' }, 's') is easier than reading/skimming 19 local
> declarations/lines. Is this really that hard to understand?
Yes.
Or rather, we are under different standards for what is easier to read
(and in some cases, maintain).
> I only picked the
> local-vs-global performance reason after arguing for a while over not
> touching _ENV because people (mostly Sean) kept telling me to use _ENV.
Careful with attribution there---I never mentioned _ENV as I'm still using
Lua 5.1 (primarily because we use Lua 5.1 at work and there would be a lot
of updating to do because of the sheer number of modules we use).
-spc