lua-users home
lua-l archive

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

On Jul 24, 2013, at 9:45 AM, Fabien wrote:

> Fancy syntaxes tend to improve your ability to map your own thoughts onto code, but make your code more impenetrable by anybody else.

Lua is currently in the same boat as Java: syntax is strictly static. Lua is even stronger than Java: compile-time behavior is not affected by anything other than the direct contents of the current compilation unit.

The problem with Java is that the lack of ability to map common thoughts onto code has made Java source a marshaling and interchange format for IDEs. The lack of extensibility makes your thoughts impenetrable by hiding them in pages of boilerplate. It's nice that you can write structure editors; it's bad that (before Microsoft scared Sun) every foreach had to be written out in longhand, and significant fractions of code were JavaBean crap *almost* all alike.

Run-time dynamicism can often substitute for compile-time expressiveness. The localized-Lua dialect runs into problems here. Of all of the DSL issues I run into, "custom operators" doesn't make the list...unless you can write your own "and"/"or" ops. ;-)