lua-users home
lua-l archive

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


On Fri, Jul 22, 2011 at 11:45 AM, Pascal J. Bourguignon
<pjb@informatimago.com> wrote:
> Dimiter 'malkia' Stanev <malkia@gmail.com> writes:
>
>>> I've got an idea.  Let's use a single character, instead of a keyword
>>> here.
>>>
>>> (for k=1, 10 do
>>>   (for j=1, 10 do
>>>    (for i=1, 10 do
>>>      f(i, j, k)
>>>      )))
>>
>> Or
>>
>> (for k=1, 10 do
>>   (for j=1, 10 do
>>    (for i=1, 10 do
>>      f(i, j, k)]
>
> No.  The problem is that the algorithm to balance parentheses becomes
> too complex.  With normal parentheses, any editor can implement the
> simple algorithm required to check parentheses, and even to provide
> higher level editing commands, like paredit does in emacs.
>
>
> --
> __Pascal Bourguignon__                     http://www.informatimago.com/
> A bad day in () is better than a good day in {}.
>
>
>

Better idea, use white-space to designate blocks, but put it after the
statement, not before. That way you can't see that pesky rubbish at
all.

Much cleaner.