Originally Posted by Dolohov
I'm wondering why they went with a signed long to represent a value that can't be negative. An unsigned long would double the gold limit.
|
Signed values allow for easier error detection. If you somehow end up with negative gold, you know something went wrong somewhere, and you can backtrack or reverse the transaction. In a perfect world it's not necessary, but it's very useful.