On Monday, 18 May 2015 at 14:34:38 UTC, ketmar wrote:
On Mon, 18 May 2015 14:30:42 +0000, Chris wrote:

The following

string[string] myarray = ["key":"value"];
string entry;
entry = myarray["key"]; // => vgc: indexing an associative array may
cause GC allocation

Why is _accessing_ an assoc treated as indexing it?

it can throw "out of range" error, which is `new`ed.

But shouldn't it read "accessing an associative array may cause GC allocation"? And maybe a hint to the exception that may be thrown.

It's not the same as

myarray["key1] = "some value";
myarray["key2] = "some other value";

A bit confusing.

Reply via email to