lua-users home
lua-l archive

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


On Thursday 15 March 2007, Brian Hagerty wrote:
> I believe my suggested implementation of self would (slightly)
> improve function call performance by obviating the need to push

i doubt it.  i don't know too much about the call frame structure, but the Lua 
core doesn't handle the 'hidden argument' case.  it's purely syntax sugar.  
the core just sees the expanded case, with an explicit self parameter.

> The other "advantage" is really the religious point about style.
>   And that is that the language could be more uniform without

as mentioned above, the core language doesn't handle the colon operator. it's 
just syntax sugar.

personally, i like the fact that the self parameter isn't really hidden.  it's 
not rare for me to use an explicit 'self-like' parameter and later use that 
very same function with a colon operator.

knowing that "self" isn't a special case makes it much easier to handle.


-- 
Javier

Attachment: pgpOzOL85_VIp.pgp
Description: PGP signature