[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua and Saint-Exupery?
- From: Mark Hamburg <mhamburg@...>
- Date: Fri, 25 Feb 2005 13:31:51 -0800
on 2/25/05 1:13 PM, PA at email@example.com wrote:
> I don't mind the dot. I mind having dots _and_ colons :))
They mean different things. The solutions that make the dot do the work of
the colon tend to be significantly less efficient and one of Lua's other
strengths is that it's fast.
One problem I do have is that using dots where you meant to use colons
doesn't generate errors as early in the process as one might like. For
obj:msg( x )
is valid, then so is:
obj.msg( x )
Both will lead to the same function getting executed but with a different
value for the first parameter. If x is a table, then the error may not be
detected particularly promptly.