5 ms·
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
by static_noise 11y ago
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?"
- dllthomas 11y agoIt'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.
- Gibbon1 11y agoI got that feeling again when I was trying to learn 6502 assembly. Amusingly at least in gcc #\\ this appears legal
- deleted 11y ago[deleted]
- nanofortnight 11y agoSometimes I can't tell if people are being serious about their objections to this or if they are willingly oblivious.
- zamalek 11y agoIndeed. It's more interesting that an explanation (top comment) was posted one hour before this objection to the "feature."
- ultimape 11y agoRaymond 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.