lua-users home
lua-l archive

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


The semicolon question is a difficult one. While Lua programmers like to omit them, many folks coming from C-like languages seem to want to write them (at least during an initial transitioning period). I decided to keep them on the slides here, but I do agree that it's not idiomatic Lua style.

Thank you for the hint with the debugger interface, I will take a look at it.

On 10/31/2017 3:18 AM, Milind Gupta wrote:
Very nice talk. Thank you. About the debug question in the end it may be helpful to mention that Lua code running inside the C/C++ application can be debugged using an available debugger interface like zerobrane studio.

On Oct 30, 2017 3:03 PM, "Javier Guerra Giraldez" <javier@guerrag.com <mailto:javier@guerrag.com>> wrote:

    On 30 October 2017 at 21:05, Andreas Weis
    <der_ghulbus@ghulbus-inc.de <mailto: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