'int' is enough for 'length' to migrate code from x86 to x64

Sean Kelly via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 18 09:04:52 PST 2014


On Tuesday, 18 November 2014 at 14:24:18 UTC, FrankLike wrote:
>
> Many excellent projects such as dfl,dgui,tango, many 'length' 
> which type is 'int' or 'uint',they are D's,many people like 
> it.but they should migrate to 64 bit.So if 'length' type is 
> 'int',they can work on 64 bit,but now,they must be modify for 
> 'length''s type.

The type of 'length' has always been size_t, which is aliased to 
uint on x86 and ulong on x64.  I think an argument could be made 
for using long instead of ulong, but the switch from unsigned to 
signed across bus widths could result in portability issues (when 
building an x64 program for x86).


More information about the Digitalmars-d mailing list