lua-users home
lua-l archive

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


Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 
> Well, of course. Lua, like Pascal, sacrifices terseness for
> readabilty. Both languages have in my opinion just the
> right balance so that one's brain and fingers go at the
> same rate.
> 
> But yes, the versatile all-purpose for loop (why on earth
> does C have a while statement? saves two semicolons but
> needs two extra letters) is the crown jewel of C syntax.

I suppose the main reasons for alternate syntax, like using
"while" instead of "for(;;)" is just to show the intent of
the code better? I guess as long as you don't go completely
crazy like Perl did a few bits of extra syntax here and there
won't hurt too much.

Though I will admit I still do like the ability to append if
statements to expressions in Perl, but it can actually make
parsing the code a bit more difficult as you need to look at
the ends of lines for potential logic. Usually I only used
that format for small expressions like "$ack++ if $oop"...
or the inverse syntax of "$ack++ unless $oop". Ah, Perl!

Of course, what qualifies as "too much" extra syntax varies
from person to person, as attested to by the discussions on
this very list when the subject comes up!

I do appreciate the minimalist design of Lua, though as I
stated before, I think my idea of "minimal" is just a tad
more than that of Team Lua. However, I will not be going
full out Perl style with the syntax for Lua++! 

I am, however, having a significant amount of fun hacking
Lua and learning new things. This list is also a fantastic
resource for new ideas and perspectives, which is great!

~Paige