lua-users home
lua-l archive

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



You could have a look at MetaLua and LuaSub, both of which allow syntax sugar extensions without patching the Lua underneath.

What this essentially does, is allowing to make N different dialects, perfectly suited to your particular itches. I think the problem you're describing has already got solutions.

The problem is taking these into mainstream. For LuaSub, it means more active nurturing (nice web site etc.), and better syntax errors if a code does not fulfill syntax rules.

-asko


Stephen Kellett kirjoitti 28.6.2008 kello 3:06:



Petite Abeille wrote:
Syntax sugar aside, it's rather straightforward to roll your own

I think we'll have to disagree on what straightforward means. For things like this, syntatic sugar is everything. Which is why, if Ruby ever becomes as fast as the rest, it will win. Your example makes try/catch/finally in C++ look delightful, its so much easier to read, understand and use.

Much as I like Lua, the purist/stripped down nature of it means that I think it will be forever a specialist niche language and JS or Ruby will end up being the ultimate implementation language (whatever their demerits).

Lua + some syntactic sugar could go a long way to making Lua a much more mainstream language.

Stephen