128 bit signed and unsigned integer types

Daniel Keep daniel.keep.lists at gmail.com
Mon Dec 29 18:29:46 PST 2008



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.

:P

  -- Daniel

P.S. 'FixedWidthInt' sucks because it's too damn long.  ;)



More information about the Digitalmars-d mailing list