[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.2 feature list?
- From: John Hind <john.hind@...>
- Date: Wed, 04 Oct 2006 17:25:06 +0100
Let me bore everyone with another crack at this automatic variable thing:
Suppose the local keyword was generalised to a local shortcut generator so:
local foo, bar, lua : a_table_ref
Means that within the current lexical scope, "foo" means
"a_table_ref[foo]", etc.
local foo, bar, lua
Is syntactic sugar for "local foo : getenv()" (Simulating the current
behaviour).
local foo, bar, lua : _G
Gives the desired global declaration without having to introduce
"global" as a keyword. There'd still need to be an OPTION EXPLICIT
switch to require (or not for compatibility) global declarations.
This gives the additional innovation of allowing local shortcuts to ANY
table, for example:
local function1, function2 :
MyVerboseCodeLibrary.AnotherLevelofGratutiousAbstraction.HaveIMadeMyPointYet
Just another crazy idea for the critics to shoot full of holes ....