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

Jeremy DeHaan via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 18 09:32:42 PST 2014


On Tuesday, 18 November 2014 at 12:33:52 UTC, FrankLike wrote:
> If you migrate your projct from x86 to x64,you will find the 
> length is error,you must modify it ,such as:
>   int i= (something).length
> to
>   size_t i = (something).length
>
> but now ,'int' is enough for use,not huge and not small,only 
> enough.
> 'int' is easy to write,and most people are used to it.
> Most importantly easier to migrate code,if  'length''s return 
> value type is 'int'.
>
> Thank you all.

This is a weird thing to argue.

just because an int is good enough for you does not mean that it 
is the best thing for all people.



More information about the Digitalmars-d mailing list