AA getLValue

2012-03-27 Thread Martin Nowak
Does anybody know an efficient way to get/create-if-missing an lvalue AA entry. I commonly resort to this, but it uses three lookups. auto p = key in aa; if (p is null) { aa[key] = inital; p = key in aa; } //...

Re: AA getLValue

2012-03-27 Thread simendsjo
On Tue, 27 Mar 2012 11:35:51 +0200, Martin Nowak d...@dawgfoto.de wrote: Does anybody know an efficient way to get/create-if-missing an lvalue AA entry. I commonly resort to this, but it uses three lookups. auto p = key in aa; if (p is null) { aa[key] = inital; p = key in aa; }