lua-users home
lua-l archive

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


I suppose one could argue that getting rid of a "superfluous"
syntactic feature like commas which is likely going to affect or
perhaps "benefit" more people would outweigh any problems introduced
into a niche like DSL or similar uses.  Well I wouldn't, for one
because I use Lua as a DSL in a way, but this is not really that
important.  I think I could live with needing a couple of extra
parentheses and stylistic preferences like these are always
subjective.

The more important point lies in the fact that, what really sets Lua
apart from other similar languages, in my mind at least, is that you
can fit its grammar into a single page and the description of the
language into a few more.  I'm not talking about paper of course but
about Lua's economy of rules, structures and concepts (without
sacrifice of expressive power or efficiency of course).  This means
that once you've understood a few basic concepts you can work out the
rest (and with any luck bend it to your needs) so there are less
concepts to worry about, less rules (syntactic or semantic) to keep in
mind and apply.  Adding rules which don't add any more expressive
power to the language but are simply there to aid new programmers or
improve special or constrained uses of the language are, I think, a
step in the opposite direction.

It's true, you can always pick the features you like and use those,
but complexity always has a way of bubbling up.  Like when reading
other people's code for instance or when you wonder why the heck this
strange thing is happening until you find out that your interpreter
did not complain about the comma you omitted but simply chose to
interpret foo (2) as two items instead of a function call.

On Wed, Mar 7, 2012 at 1:09 AM, Josh Simmons <simmons.44@gmail.com> wrote:
> On Wed, Mar 7, 2012 at 7:38 AM, Eric Wing <ewmailing@gmail.com> wrote:
>> As a counterweight to your DSL example, I recall CMake
>> disliking/rejecting Lua because commas would suddenly be required.
>>
>
> I wouldn't give this much weight given how horrific CMake syntax is.
>
> Given your example you could just change your design to be something
> like premake.
>
> http://industriousone.com/sample-script
>