Signed word lengths and indexes
"Jérôme M. Berger"
jeberger at free.fr
Tue Jun 15 11:39:38 PDT 2010
Walter Bright wrote:
> bearophile wrote:
>> We are going to 64 bit systems where 63 bits can be enough for
>> lenghts. If
>> arrays of 4 billion items are seen as important on 32 bit systems too,
>> then
>> use a long :-) 2) I don't like D to silently gulp down expressions
>> that mix
>> signed and unsigned integers and spit out wrong results when the integers
>> were negative.
>
> That idea has a lot of merit for 64 bit systems. But there are two
> problems with it:
>
> 1. D source code is supposed to be portable between 32 and 64 bit
> systems. This would fail miserably if the sign of things silently change
> in the process.
>
Actually, that problem already occurs in C. I've had problems when
porting code from x86 to x86_64 because some unsigned operations
don't behave the same way on both...
Jerome
--
mailto:jeberger at free.fr
http://jeberger.free.fr
Jabber: jeberger at jabber.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100615/f69bc97c/attachment.pgp>
More information about the Digitalmars-d
mailing list