[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: CppCon talk about Lua
- From: Javier Guerra Giraldez <javier@...>
- Date: Mon, 30 Oct 2017 22:02:53 +0000
On 30 October 2017 at 21:05, Andreas Weis <email@example.com> 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...
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.