lua-users home
lua-l archive

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


I like it too ! But I'm programmer. I'm not sure this is so easy to
explain to a non programmer. And when condition has more than one term
like inside a range...

The reason for me to choose lua is not the footprint (although I much
prefer light footprint, but I can't seriously claim this is so needed in
my case)
Not much the speed. Well anyway difference between other script
languages are not that meaningful for my usage, where most of the time
is spent in C++ code.

So the main motivation is the very simple syntax to define simple and
readable configurations. So this is why, I try to put the emphasis on
simplicity to write this.



-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Stefan
Brantschen
Sent: Tuesday, September 19, 2006 8:50 PM
To: Lua list
Subject: Re: Default value in function parameters?


On 19 Sep 2006, at 18:58, Rici Lake wrote:

> But more Lua like would be:
>
> a = { a = 1,
>       b = { b = 2,
>             c = {native = 1, rock = 2}[style] or 0
>           }
>     }

Yeah! -- the power and straight-line, Bauhaus-style elegance of Lua.  
No new keywords needed... :-)

With regards
- Stefan