[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.1.1 has been frozen
- From: Andreas Stenius <kaos@...>
- Date: Tue, 13 Jun 2006 17:23:03 +0200
Javier Guerra skrev:
On Tuesday 13 June 2006 10:06 am, Andreas Stenius wrote:
2. Even I work on building some kind of OO structure in lua, and
came across the desire to some new syntactic sugar:
could you show a sample code where this could be useful?
foo = function( ... ) end;
bar = function() end;
bonk = 5;
-- my last note for tbl constr.
-- ouch, should work for keyword 'function' too..
function phobo( ... ) end;
would be the same as:
MyTest = class
... the same
bonk = 5;
phobo = function( ... ) end;
Oh, and while I'm at it.. as it is, I'd have to add `self' as the
first argument to every function.. would also be nice to make the
needself arg (in the impl) to be true if a function is declared as
foo = function:( ... ) or something like that... maybe, just thought of it.
I think most of this is feasible, maybe by redesigning the way the
function's syntactic sugar work to be more generic for a assignment expr.