Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My point is that you can’t define “-3” as “0-3” to make it work: you’re assuming exactly what’s being debated (via sleight of hand) when you insert the terms with brackets in the way you do rather than the way I do.

When you try to swap in the unary operator without that to make it “less surprising”, you get 9.

Precisely what you said was wrong about the unwary operator (in Excel).



But no one is defining -3 as (0-3). You are entirely missing the point. I am going to quote myself again:

> The original argument is entirely related to having unary minus and binary minus which are different operators conceptually have similar precedence as being less surprising.

And no, you don’t get 9 when you swap the unary operator. That’s the whole point and why it’s surprising that Excel did reverse the precedence for implementation easiness.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: