News for hackers. Stuff that matters.
Re:Swapping two Numbers without Temporary Variables by anyfoo on Friday March 25, 2022 @02:46AM (#30799308)
I think it's pretty intuitive that the size of a variable is the amount of memory it takes, while the range of a variable describes the bounds of the values it can represent.

This is consistent with other uses: The size of an array, the size of a data structure in general, the size of a file... In all of those you are concerned about how much memory or disk space is taken.

So I think calling the range "size" is counterintuitive and gives the wrong idea, and I do not agree that the "base 10 size" of a variable is equivalent to its range. (What does "base 10" have to do with it anyway? The range is doubled no matter what base we're operating in.)

There are no comments on this comment yet.