O'Reilly logo
  • Sebastien Dejean thinks this is interesting:

For integers, +x is a shorthand for 0+x and -x is a shorthand for 0-x; for floating-point and complex numbers, +x is just x and -x is the negation of x.


Cover of The Go Programming Language


Why is the unary operation on an int different than for a float/complex?