How to make a global immutable associative array?

bearophile bearophileHUGS at lycos.com
Tue Mar 18 19:52:22 PDT 2014


Rikki Cattermole:

> Is an enum not appropriate? Because it can be used to push 
> constants and available at ctfe.
>
> enum int[int] aa = [1: 2, 3: 4];
> pragma(msg, aa);

This is bad from an efficiency point of view. I think Don even 
suggested to disallow it.

Bye,
bearophile


More information about the Digitalmars-d mailing list