Hacker News new | ask | show | jobs
by coldtea 1020 days ago
>I wonder why =+ is so obviously a mistake

Consider

  x = -5
now how about:

  x =- 5
One makes x negative 5, the other subtracts 5 from it. And under this design of the operator the only difference is a space.

It's the same with +, just that we're not used to seeing unary plus in the wild.

1 comments

>> x =- 5

I think you mean: x -= 5, which indeed is different.

I'm showing how it would be under the original operator design which was reverted, which was "=-".