How to initialize a associative array?

Carl Vogel via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Dec 24 19:12:09 PST 2016


On Saturday, 24 December 2016 at 11:21:11 UTC, Stefan Koch wrote:

> You cannot initialize an AA at compile-time.
> Because AA's are provided by druntime and the ABI is not stable.

This bit me when I was first starting out as well. I feel like 
there's really very little documentation on this, and I think 
most people's expect that you'd be able to initialize AAs from 
literals at compile time, just like normal arrays. Does anyone 
know if compile-time initialization of AAs is something that will 
be fixed?


More information about the Digitalmars-d-learn mailing list