Search
```Don wrote:
> Daniel Keep 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' ?

I think the bicycle shed would look hideous if it were named anything but "Int(uint bits)".
```
```Don wrote:
> Daniel Keep 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'.

I think Int following Fixed pretty much takes that meaning away, but that's only me.

> It's a shame that 'widthed' isn't a word. 'WidthedInt' seems to be the concept we want. 'SizedInt' ?

I like them less than FixedInt, but I trust a better name will come forth.

Andrei
```
```Don wrote:
>
> 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' ?

I like names that read like a phrase.  How about IntOfSize?  Second choice would be SizedInt.

Sean
```
Next ›   Last »
1 2 3 4 5