[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: python like syntax for lua
- From: Gustavo Niemeyer <niemeyer@...>
- Date: Fri, 13 Jun 2003 16:29:16 -0300
> This could very easily be done as a pre-processor written in Lua...
> I personally like the Python syntax .. Python tends to be very legible. But I
> really don't like the way they mix tabs and spaces. It seems to me that the
> parser doesn't know until it's read a few lines of the file wether to use
> spaces or tabs or both.
The interpreter does its best to do the right thing. You can use
as many spaces as you want, and as many tabs as you want. You can
even mix them, and also exchange them (to exchange you need 8 space
> In Lua, it also leads to somewhat unattractive things like:
> for i in obj:iterator():
Yep.. that's awful.
Another hard point will be the 0-indexed stuff, if you're planning
to implement it at all. Lua has a special meaning for 0 in many cases.
> Besides, one of the nice things about Lua is its size, right? With the
> current syntax, you could strip all the whitespace out of a lua file
> and insert some necessary semi-colons, then gzip the whole thing,
> resulting in a very small source ... there's no way to do that if
> whitespace is significant.
This is not a significant point to me, since I've never used compressed
script files (nor space-stripped ones) in any language. OTOH, you
probably agree that repeated spaces is something that compresses pretty