by shevy-java · 5mo ago · 0 comments
That's just one example of so many more. I get that lua occupies a useful niche with its focus on embedded systems, but lua is not really a well-designed language in general. JavaScript has a similar problem.
if x + y + z > a
or verylongconditionalhere ()
or anotherverylongconditionalhere ()
then
...
after `if` and `elseif` the parser simply goes on until it finds `then`. for long,list,of,variables,here
in ageneratorhere(bigparameterhere)
do
end
and local x do
-- everything after is just here to define x
end
I'm still a little irked it works so well, the only alternative would be for the language to have labeled blocks. but that might be too terseIn Ruby you can choose between "then" and a newline.
This is very pot calling the kettle black.