[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Suggestion for 5.3: import() for creating a "slew" of locals
- From: steve donovan <steve.j.donovan@...>
- Date: Sun, 17 Nov 2013 12:40:34 +0200
On Sun, Nov 17, 2013 at 11:16 AM, Dirk Laurie <email@example.com> wrote:
> What we should rather be looking for, is something with much
> wider application that happens to be a convenient way of also
> implementing this feature.
Now that makes sense!
It has to happen at the language level, because of local slot
allocation being compile-time.
Something like 'local insert, concat from table' is of course also
useful in local function contexts. There the scope isn't so large so
the renaming thing is no longer so crucial (and there are other
technical advantages, such as not using too using too many file-level
local slots, and true locals being a little faster than upvalues)
We all have _run-time_ tricks (pl has utils.import etc) but they are
going to be slower and make it harder to understand what's happening
in a program - mostly for 'scripting' as opposed to 'programming'.