lua-users home
lua-l archive

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




On 10/03/16 05:09 AM, Thijs Schreijer wrote:
I never thought I'd say this, but I like the way Visual Basic 6 does it:
with foo
     .x = 1
     .y = some_local_var
end with
I don't remember the exact syntax, but the important part is you still
included the dot from foo.x, so that distinguished properties from other
variables in outer scopes.
While reading up the thread, I had the same thought. I also like that about VB.

Thijs
This can be implemented with .name as being a global access. But you'll need to end your lines with a ;.

e.g.

do local _ENV = something;
  .a = 1;
  .b = 2;
end

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.