Hacker News new | ask | show | jobs
by neeeeees 1320 days ago
Good answer. OP didn’t specify “blew your mind in a good way”.
1 comments

If "not in a good way" counts, my nominee would be discovering the hard way that a Windows C function declared as type BOOL can actually return 1,0, or -1.

Now, if it had been declared int, I would probably have been on the lookout for it using something other than 1 or 0 as an error condition, but why bother to explicitly invent a BOOL type and then abuse it that way?