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

Marco Leise via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 21 12:32:07 PST 2014


Am Wed, 19 Nov 2014 11:01:12 +0000
schrieb "Kagamin" <spam at here.lot>:

> On Tuesday, 18 November 2014 at 18:23:52 UTC, Marco Leise wrote:
> > Mixed arithmetics decay to unsinged anyways and you don't need 
> > checks like `assert(idx >= 0)`.
> 
> What such assert gets you, what bound checking doesn't?

It gets me the same when idx is an index into a D slice.

-- 
Marco



More information about the Digitalmars-d mailing list