[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Did they mean "." or ":"?
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 17 Feb 2010 09:44:06 +0200
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 ':' !