Thread overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
November 18, 2014 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
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. |
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike Attachments: | On Tue, 18 Nov 2014 12:33:51 +0000
FrankLike via Digitalmars-d <digitalmars-d@puremagic.com> 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.
drop your C.
auto len = smth.length;
works ok for both x86 and x86_64 (don't know what x64 is).
|
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | On Tuesday, 18 November 2014 at 13:35:46 UTC, ketmar via Digitalmars-d wrote:
> On Tue, 18 Nov 2014 12:33:51 +0000
> FrankLike via Digitalmars-d <digitalmars-d@puremagic.com> 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.
> drop your C.
>
> auto len = smth.length;
>
> works ok for both x86 and x86_64 (don't know what x64 is).
x64 is commonly used by windows programmers to refer to x86_64 with a 64 bit OS.
|
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | > drop your C.
>
> auto len = smth.length;
>
> works ok for both x86 and x86_64 (don't know what x64 is).
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.
|
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike Attachments: | On Tue, 18 Nov 2014 14:24:16 +0000
FrankLike via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> > drop your C.
> >
> > auto len = smth.length;
> >
> > works ok for both x86 and x86_64 (don't know what x64 is).
>
> 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.
broken code must be fixed by the authors of the broken code. that code is broken. authors must fix it.
|
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | >> 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.
> broken code must be fixed by the authors of the broken code. that code
> is broken. authors must fix it.
Now,dfl's anthor miller has stopped updating the dfl project,and dgui also was.But they are excellent,we like to use it.
|
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin |
>>> 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'.
How about your idea?
|
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike Attachments: | On Tue, 18 Nov 2014 14:41:18 +0000
FrankLike via Digitalmars-d <digitalmars-d@puremagic.com> 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.
> > broken code must be fixed by the authors of the broken code.
> > that code
> > is broken. authors must fix it.
>
> Now,dfl's anthor miller has stopped updating the dfl project,and dgui also was.But they are excellent,we like to use it.
fork 'em and fix 'em. if nobody wants to fix the project, the project is dead and should be not used, obviously.
|
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike | 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.
I'm using size_t and std::size_t in C/C++...but sure I am a bit weird/extremist.
|
November 18, 2014 Re: 'int' is enough for 'length' to migrate code from x86 to x64 | ||||
---|---|---|---|---|
| ||||
Posted in reply to ketmar | > 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'.
How about your idea?
|
Copyright © 1999-2021 by the D Language Foundation