[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: bug/feature: 'if 1then print"valid syntax!"end' is valid syntax
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 9 Aug 2016 07:29:41 +0200
2016-08-08 20:56 GMT+02:00 nobody <nobody+lua-list@afra-berlin.de>:
> Whether it's worth break^Wfixing is debatable...
The Lua rule is: compile a statement until adding anything more
would be invalid; there the next statement starts. This is a simple
rule, although not conforming to prejudices arising from knowledge
of some other language.
The rule makes it possible to write ugly, almost incomprehensible
programs. Phrased like that, most languages have such a feature.
It is not a bug.
> the simplest fix is clearly "just don't write it like that!"
Exactly.