lua-users home
lua-l archive

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

> But I sometimes daydream about making all of Lua's statements into
> expressions, removing 'stat' altogether.

Honestly, I'd vote to keep the ternary operator out of the base
language (just like classes, exceptions, monads, continuations,
actors, macros, cons cells, arrays, fixed-point arithmetic, matrices).

If you like OOP, go for Java, C++, C# and the likes;
If you like FP, go for Haskell or Lisps;
If you want to do systems' programming in an interpreted language, go
for Python or Ruby.

Frankly, for me Lua is an imperative language with simple syntax augmented with:
 - first class functions (and coroutines, lexical scoping, tail calls);
 - the almighty table (data structure, namespace, metatable,
environment, switch statement, object, class, functor),
And It should be used either has an embedded language or for data description.

Frankly, my knee-jerk reaction to something like this is always: "This
guy is complaining that he can't use is hammer like a screwdriver",
but I'm the first to recognize that I've never used Lua for anything
other than having fun (nor have I contributed very positively to any
discussion in this list).