4 ms·
Sure, I understand. The surrounding code would include the type of x, which, if char, would help understanding even more. But you’re channeling some crazy madn
by robotresearcher 9y ago
Sure, I understand. The surrounding code would include the type of x, which, if char, would help understanding even more.
But you’re channeling some crazy madness suggesting that someone would use ‘A’ to mean 65. Shudder. I guess we’ve all seen some horrors over the years.
- coldtea 9y ago>But you’re channeling some crazy madness suggesting that someone would use ‘A’ to mean 65. Or just an encoding scheme.
- robotresearcher 9y agoWhere 65 means ‘A’? Madness.
- vageli 9y agoA is 65 in ASCII. http://www.asciitable.com http://www.asciitable.com
- robotresearcher 9y agoI know. It was a joke.
- vlovich123 9y agoYou could have a binary file format with a header of ABBA. You could choose to check the signature by doing an integer comparison of 65666665, 0x41424241 or "ABBA". Like I said, ASCII_A is a bit silly, but the maintenance value of extracting constant literals to constant variables with an explicit name & documentation explaining where the constant comes from is pretty solid, at least in my experience.