More magical AA semantics
Jonathan M Davis
jmdavisProg at gmx.com
Sat Jan 12 04:51:47 PST 2013
On Saturday, January 12, 2013 13:46:57 monarch_dodra wrote:
> On Saturday, 12 January 2013 at 12:41:12 UTC, Jonathan M Davis
>
> wrote:
> > My gripe with
> > something like ++a[0] working when there's no a[0] is that
> > you'd be adding to
> > an element that doesn't exist yet.
> >
> > - Jonathan M Davis
>
> Not to mention, if "++" throws, I bet you'd insert T.init in
> a[0]. I don't see it behaving any other way.
Which is precisely one of the AA bugs that I'm most annoyed with:
aa[0] = funcThatThrows();
inserts T.init at aa[0].
- Jonathan M Davis
More information about the Digitalmars-d
mailing list