[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Probably bug in implementation of numerical constant parsing
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 18 Sep 2012 18:00:42 +0400
On Tue, Sep 18, 2012 at 5:00 PM, Philippe Lhoste <PhiLho@gmx.net> wrote:
> On 17/09/2012 18:08, Egor Skriptunoff wrote:
>>
>> On 9/17/12, Miles Bader <miles@gnu.org> wrote:
>>>
>>> Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> writes:
>>>>
>>>> The same problem occurs with
>>>> print(64..s)
>>>
>>>
>>> But, why would anybody write that instead of print("64"..s) ?
>>> -miles
>>
>>
>> I stumbled upon it when I was trying to write something like this:
>> print(n+1..' rabbits')
>
>
> Sometime, I dream of a language forcing to put whitespace around operators.
> I believe it helps readability, and it would reduce or eliminate such
> ambiguity...
> But I don't know if it would be popular, some programmers like compact code
> (or hate typing, but a good IDE can help here).
It is not a job for a language specification, it is a job for code
validation tools (like, say, lint for C) and code formatting tools
(like, say, astyle for C).
I wish we had more of these for Lua. :-) (But maybe I should look more
closely on lua-inspect.)
Alexander.