lua-users home
lua-l archive

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


On Tue, Sep 18, 2012 at 12:19 PM, Rena <hyperhacker@gmail.com> wrote:
> 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.

Since most languages I read / write regularly have the "open syntactic
element means the next line is a continuation of this one" feature, I
tend to break lines *for* readability. At least Perl, R, Ruby and Lua
operate this way.


-- 
Twitter: http://twitter.com/znmeb; Computational Journalism Publishers
Workbench: http://j.mp/QCsXOr

How the Hell can the lion sleep with all those people singing "A weem
oh way!" at the top of their lungs?