20 ms·
The need for semicolons is easy to understand. It's required if you have operators that can be both binary and unary. Look at the following in non-semicoloned C
by Chabs 11y ago
The need for semicolons is easy to understand. It's required if you have operators that can be both binary and unary. Look at the following in non-semicoloned C:
a + b
*c - d
is it one or two expressions?
- ufo 11y agoLua avoids this issue because it does not allow an statement to be just an expression.
- theseoafs 11y agof()
- ufo 11y agoFunction-call-statements are a special case. Not every expression can be turned into a statement. http://www.lua.org/manual/5.3/manual.html#3.3.6 http://www.lua.org/manual/5.3/manual.html#3.3.6 This gets rids of almost all the syntactic ambiguities. The only big one that is left is statements that start with parenthesis. http://www.lua.org/manual/5.3/manual.html#3.3.1 http://www.lua.org/manual/5.3/manual.html#3.3.1