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

What demented mind invented this? It's not posted on April 1st so I'm not sure it's meant as a joke. Also it's on msdn.com.

Tilde and minus look just alike and make reading the code much harder if used together. "Look there's a --i oh no, it's actually -~i or is it ~-i or ~~i?"



It's just regular unreadable code. ~ and - are both prefix operators: bitwise complement and negation, respectively. With two's-complement arithmetic, "complement then negate" adds one while "negate then complement" subtracts one.


I got that feeling again when I was trying to learn 6502 assembly.

Amusingly at least in gcc

#\\ this appears legal


Raymond Chen rants about other developers doing stupid things - his job is basically to help them get stuff done in 'the right way' from what I can tell, so he finds a lot of weirdness like this.

My impression is that this is a parody of something ridiculous he found.


Sometimes I can't tell if people are being serious about their objections to this or if they are willingly oblivious.


Indeed. It's more interesting that an explanation (top comment) was posted one hour before this objection to the "feature."




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

Search: