• Knusper@feddit.de
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    In the languages I know, i-=-1 or x=3 are not expressions, but rather statements, so they do not evaluate to a value.

    So, this would be a compiler error:

    a = (x=3)
    
      • Knusper@feddit.de
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        1
        ·
        1 year ago

        Sounds like the opposite of fun to me, to have those as expressions…