• squaresinger@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    6 days ago

    Find me a language where it doesn’t work like that, and we’ll continue the discussion.

    Unary - operator is standard in every single language that I used so far, including C/C++, Java, Python, Kotlin, Lua, JS/TS, Groovy, PHP, Visual Basic, Excel, Mathematica, Haskell, Bash.

    Here’s more info btw: https://en.wikipedia.org/wiki/Unary_operation