lua-users home
lua-l archive

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


Hi, list!

(To holywar people: please take a deep breath and count to twenty
before priming the flame thrower.)

We all know about and discussed many times on this list the disease
that most non-initiated Lua users are prone to — the urge to change
the language. With people of a certain mindset it is epidemic, at a
certain point of your progress with the language you almost guaranteed
to catch this.

It is obvious that, as with any other complex system, one should not
even attempt to make "production-level" changes (i.e. not
experimental, toy or educational changes) until he fully mastered ins
and outs of the system and knows all pros and cons, whys and why nots.

Otherwise, the only possible outcome is a waste of time and frustration.

Even given that knowledge, the change in the language comes with the
compatibility price. You create your own private dialect, which is not
compatible with the rest of the world. (Also, LuaJIT2.) You force
yourself to live within your own tiny closed ecosystem. It may be a
good thing, and some of changes may be worth it — for your specific
project, — but, a the very least, you must be aware what you're up to
before you start — see above about the mastering the language.

However, the Lua is easy to grasp and change, and the syntax and
semantics of the language are considerably different from what user is
used to (a good thing! see discussions about performance, mind context
switching etc.). This greatly lowers the perceived barrier to
tinkering with the language.

In short, as I repeat often: "when you code in Lua, do it in Lua".

When I teach people to use Lua (well, it happens from time to time),
or when, say, I see a related question on StackOverflow, I repeat
above thoughts in one form or another.

It happens often enough, so I feel the need for a well-balanced and
motivated authoritative text on that matter that I can point people
to.

Maybe there is such text somewhere already and I missed it?

Or maybe we (the community) should write this text collectively?

Alexander.

P.S. Note that I accept the fact that tinkering with the language is
(or was) a long-standing tradition in Lua. But times change. Not many
can afford to have a custom language fork in the project and forgo
benefits from community-written libraries, LuaJIT etc. More
importantly, forks harm reuse and thus do harm the community.

My position is that Lua must remain tinkerable as it is now — but the
tinkering by newbies should be discouraged (when it is not for
educational or toy project purposes).