On Thursday, 8 January 2015 at 15:49:46 UTC, Dragos Carp wrote:
On Thursday, 8 January 2015 at 15:45:27 UTC, Nordlöw wrote:
Is

   key in aa ? aa[key] : ValueType.init;

the most efficient way to maybe return a value from an associative array aa?

aa.get(key, ValueType.init)

That was too easy ;)

It would be nice if the compiler could detect usage of aa.get() automatically and issue either a diagnostics or transform it in an optimization pass.

Reply via email to