'int' is enough for 'length' to migrate code from x86 to x64
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 19 06:19:56 PST 2014
On Wed, 19 Nov 2014 14:04:15 +0000
Don via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> I don't know what you mean. For unsigned ints, carry is not an
> error. That's the whole point of unsigned!
this *may* be not a error. it depends of what programmer wants.
> This is the job of the compiler, not the programmer. The compiler
> should do this at all possible places where a slice could exceed
> the int.max / long.max. That's cheap because there are hardly any
> places it could happen (for example, for array slices it can only
> happen with 1-byte types).
i, for myself, don't want the compiler to do arcane type conversions
behind my back.
> ---
> Almost everybody seems to think that unsigned means positive. It
> does not.
> ---
sure, it includes zero, which is neither positive nor negative. ;-)
-------------- 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/20141119/35e79d47/attachment.sig>
More information about the Digitalmars-d
mailing list