lua-users home
lua-l archive

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


Fabien <fleutot+lua@gmail.com> writes:
> Since you're going to break source compatibility anyway, I'd suggest that
> you make the ";" statement separators mandatory.

That's literally true, but _completely_ misses the point of the
extension, which is to add a syntactically distinct and obvious OO
"layer" on top of the existing language.  This makes it much easier for
existing Lua programmers to use the feature, and allows new programs to
easily use existing documentation, code-snippets, libraries, etc.

Making separators mandatory completely ruins all of that.

> Note that mandatory separators would also solve your index/invocation
> ambiguity

... at huge cost.

While "contrived rules" may seem worse in theory, in practice they're
often much better, because they mirror how people actually write code.

Of course it's good to minimize such things, but they must be judged
individually to determine whether they're truly a problem or not.

Seriously tho, while there may indeed be a better syntax than the [...]
stuff, mandatory separators is a horrible idea.

-Miles

-- 
Happiness, n. An agreeable sensation arising from contemplating the misery of
another.