lua-users home
lua-l archive

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


On 2012-09-18 9:00 AM, "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).
>
> --
> Philippe Lhoste
> --  (near) Paris -- France
> --  http://Phi.Lho.free.fr
> --  --  --  --  --  --  --  --  --  --  --  --  --  --
>
>

That might be nice until I have to break an 82-character line in two instead of just removing the spaces in 'x + 1'... I find having to split something into multiple lines harms readability quite a bit at times, so I sometimes remove spaces to make it fit.