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

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 18 10:03:18 PST 2014


On Tue, 18 Nov 2014 17:59:04 +0000
David Eagen via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> Isn't the purpose of size_t is to be large enough to address all 
> available memory? A negative value is not only too small but 
> doesn't make sense when discussing lengths.
> 
> Correctness requires using size_t.
yes. besides, there is no such thing as "negative length", so it's
somewhat... weird to use signed integer for length.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141118/7e0f26f0/attachment.sig>


More information about the Digitalmars-d mailing list