128 bit signed and unsigned integer types

Don nospam at nospam.com
Mon Dec 29 22:11:17 PST 2008


Daniel Keep wrote:
> 
> 
> Chad J wrote:
>> Cool, but don't name it FixedInt unless it implements fixed point
>> arithmetic.
> 
> Fine, but don't name it 'Integer' or 'Int' unless it can store any value 
> in the set of integers; you know, the infinite one that doesn't have 
> that stupid "1 + T.max = T.min" nonsense.
> 
> The name 'FixedInt' is ambiguous because it doesn't specify what 
> attribute of the int is being fixed; *you* look at it and see 
> 'FixedPointInt' which is clearly impossible.  Someone else will look at 
> it and see 'FixedWidthInt'.  Yet another person will see 'FixedValueInt' 
> and question why they didn't just use const.
> 
> No matter what name you come up with, you're eventually going to find 
> someone who hates it and can come up with a good reason for not using it.

I disagree. I'm with Chad. 'Fixed' has a very well established meaning 
in computer arithmetic, and it means 'Fixed point arithmetic' (it's as 
fundamental a term as 'floating'.
It's a shame that 'widthed' isn't a word. 'WidthedInt' seems to be the 
concept we want. 'SizedInt' ?



More information about the Digitalmars-d mailing list