Integer conversions too pedantic in 64-bit

Piotr Szturmaj bncrbme at jadamspam.pl
Tue Feb 15 05:17:36 PST 2011


spir wrote:
> On 02/15/2011 03:44 AM, Piotr Szturmaj wrote:
>> spir wrote:
>>> Rename size-t, or rather introduce a meaningful standard alias? (would
>>> vote for Natural)
>>
>> Maybe ptrint and ptruint?
>
> If ptr means pointer, then it's wrong: size-t is used for more than
> that, I guess. Strangely enough, while "size" may suggest it, .length
> does not return a size_t but an uint.

ptr prefix shows that int/uint depends on CPU word (32/64 bit), i.e. 
they have the same size as pointer. However, it may led to confusion, 
which type - signed or unsigned - is right for the job.


More information about the Digitalmars-d mailing list