Size_t on x86 is uint,on x64 is ulong,it's a good thing?

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 17 09:46:13 PDT 2014


On Thursday, 17 April 2014 at 16:36:29 UTC, FrankLike wrote:
>  Size_t  on x86 is uint,on x64 is ulong,it's a good thing?
>
>   I don't think is ok.
>   it  creates many convert  thing,such as length is ulong ,must 
> cast to int or cast to uint. It will be waste of time ,I think.

It's the same in C and it reflects what the hardware is doing 
underneath with regard to memory addresses. That's the point of 
size_t. If it didn't change size then we'd all just use ulong or 
uint for all our array lengths etc.


More information about the Digitalmars-d mailing list