More magical AA semantics
monarch_dodra
monarchdodra at gmail.com
Sat Jan 12 04:53:42 PST 2013
On Saturday, 12 January 2013 at 12:52:43 UTC, Jonathan M Davis
wrote:
> 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
Well, it looks like this is fixed in 9rnsr's pull. I'll ask him
directly regarding "++".
More information about the Digitalmars-d
mailing list