[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: syntax likes and dislikes (RE: Evaluating LUA)
- From: Reuben Thomas <rrt@...>
- Date: Tue, 13 Aug 2002 16:52:51 +0100 (BST)
> Find the 'then' in the following English sentence:
>
> If Sue is hungry she'll eat the apple.
Let's see...first she nibbles a biscuit,
Then if Sue is hungry she'll eat the apple.
Or maybe she often gets peckish in the afternoon, and saves part of her
lunch until tea-time.
If Sue is hungry she'll eat the apple then.
Or maybe this is an old English text
If Sue is hungry she'll eat the napple.
> My interest in removing unnecessary syntax is not to reduce typing, but
> to make Lua a smaller and more trim language. Admittedly, making two
> keywords optional doesn't substantially result in a leaner language, but
> it is consistent with the Lua author's stated goals.
I agree. Assuming you're not going to make Lua properly functional, and
hence require ; after statements, you might as well remove while's do and
then. Their function at the moment is purely visual (as demonstrated by
the patch), and can equally be achieved with indenting.
Making them optional for 5.0 would satisfy all but the crustiest of
crusties.
Someone said it could lead to greater diversity of style in, for example,
libraries. As the maintainer of stdlib, I've developed a standard coding
style, and frankly do and then are the least of my worries. There's
indentation (thanks, lua-mode.el!), variable naming, and vaguer,
philosophical things to worry about too. As far as code layout goes,
having full reflexive access to Lua programs is much more effective (so
you can load code in and spit it out in the layout you want) than any
syntax changes.
--
http://www.mupsych.org/~rrt/
Reality is what refuses to disappear when you stop believing in it (Dick)