you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 10 months ago* (last edited 10 months ago)

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

Unary minus 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

  • source
  • parent