lua-users home
lua-l archive

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


On Mon, Sep 17, 2012 at 11:00 AM, Sam Roberts <vieuxtech@gmail.com> wrote:
> On Mon, Sep 17, 2012 at 9:54 AM, joao lobato <btnfdp.lobato@gmail.com> wrote:
>> So, another wart that would not exist without automatic number-string coercion?
>
> No, its completely unrelated to that. Its a lexing problem, one .
> could be a decimal point, or the first character of the concatenation
> operator, and the lexer must choose one or the other, it can't
> look-ahead.
>
> Similar to c++ and it's problem with distinguishing whether a < is
> being used for template definition, or a left-shift operator.
>
> Sam
>

Strictly speaking C++'s issue is > vs. >>, as template definitions
require an identifier before the <. :P

But anyway, Joao's point is that if we didn't have number-string
coercion, you would have to have written "tostring(64)..s", which
wouldn't have this problem. It's a valid point, but I'm on the other
side of the coercion argument -- I acknowledge that the coercion is a
wart, but I don't think it's a misfeature given Lua's target use
cases.

/s/ Adam