lua-users home
lua-l archive

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


On Tue, Sep 23, 2008 at 8:02 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> http://lua-users.org/lists/lua-l/2007-10/msg00751.html

The consensus of that discussion was that it would be a bad idea, for
several interesting reasons.  One, is that programmers use syntax as
an important cue in remembering _what_ language they are working in.
It's true that JavaScript resembles Lua in many ways, but the
differences are substantial (for example, lazy conversions) and
there's a danger of 'cross-talk'  happening.  The other is that an
agreed-on syntax is an important contract between programmers, so that
it becomes hard to share code, even though the actual transformations
are   'trivial' and 'just lexical'.  Granted, if one was content to
amuse oneself, this would not be a problem, and it's true that
converting such a 'skinned' version back into canonical Lua is not
difficult.  One could imagine an intelligent environment where you
could type Lua in curly-bracket form, and save it in canonical form.
But consider: any auxilliary tools need to be modified as well!  It's
not a recipe for complete disaster but seems to solve a short-term
problem (distate for explicit block keywords) that could just as well
be solved by a smart editor which expands abbreviations. As a simple
example, with SciTE I can define 'if' to mean the following expansion:

   if then

   end

So if it's excessive _typing_ that's the problem, then there is a
conventional solution.

steve d.