Size_t on x86 is uint,on x64 is ulong,it's a good thing?
FrankLIKE via Digitalmars-d
digitalmars-d at puremagic.com
Thu Apr 17 17:31:18 PDT 2014
On Thursday, 17 April 2014 at 16:46:15 UTC, John Colvin wrote:
> 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.
Thank you,I think 'use uint' is better than 'use ulong' .
You know that 'point.x,point.y' is int ,on x64 ,no change,
'length' keeps the same to 'point.x,point.y' ,maybe a good thing.
Frank.
More information about the Digitalmars-d
mailing list