lua-users home
lua-l archive

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


On Wed, Feb 17, 2010 at 9:29 AM, Eike Decker <zet23t@googlemail.com> wrote:
> In short: I am unsure if it isn't better to confuse people (and make
> them learn something) than trying to do what they might expect (just
> to be confused later on).

Yes, using a '.' is a crutch that will lead to much puzzlement later
('why is it s:gmatch(); f:read()?') apart from the potential cost of
so many closures.

Having an unambiguous error - that the self parameter is not the
object type - should keep people on the path of truth ;)

steve d.

PS. As a piece of consistent weirdness, in LuaJava both 'static' and
'non-static' methods use ':'  !