[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Pseudo-Complete Lua Syntax
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 29 May 2013 23:06:04 -0300
> Roberto Ierusalimschy <firstname.lastname@example.org> writes:
> > - The definition of a numeral in Lua follows C (which, in retrospect,
> > may not have been a very good idea). So, things like "3." are correct,
> > too.
> In which cases is it not a good idea...?
- It creates silly conflicts, such as x = 3..7
- It complicates the lexer
- It complicates any informal or formal description of numerals
- It complicates patterns that have to match numerals
Also, one can argue whether writing 3. is any better than 3.0. (It saves
typing one character, but it is an easy one to type.)
Maybe a simpler definition, demanding at least one digit before and after
the dot, would be more "Lua-like".