lua-users home
lua-l archive

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


On 30 October 2017 at 21:05, Andreas Weis <der_ghulbus@ghulbus-inc.de> wrote:
> If you feel that I gravely misrepresented some aspect of the language or
> you think that there is something that is clearly missing from the
> presentation, I will gladly take your advice into consideration.

arghh.... so many semicolons...


a curious deviation: when i write javascript, i put a semicolon on
every line, but that's because JS actually ends every statement with a
semicolon.  of course you can omit them but then the "automatic
semicolon insertion" happens.... I prefer to put them myself, thankyou
very much.  (yes, i know that "modern JS developers" hate me for that)

but Lua doesn't work like that.  in fact, in most cases you don't need
_any_ separator between statements beyond some whitespace, "x=4 y=6"
is perfectly valid, and at no point the parser insert anything between
those two.  the semicolon is just a valid separator that helps to
disambiguate some dark corner cases.


apart from that, i liked the presentation very much.  especially about
how modern C++ can help with the always uncomfortable case of managing
dynamic types on a statically typed language.



-- 
Javier