<div dir="ltr">On 11 November 2013 20:14, Daniel Kozak <span dir="ltr"><<a href="mailto:kozzi11@gmail.com" target="_blank">kozzi11@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Monday, 11 November 2013 at 10:13:02 UTC, Daniel Kozak wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Monday, 11 November 2013 at 10:11:18 UTC, Daniel Kozak wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Monday, 11 November 2013 at 08:30:32 UTC, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
immutable string[string] priorityMap = [<br>
"1" : "blocker",<br>
"2" : "critical",<br>
"3" : "critical",<br>
"4" : "major",<br>
"5" : "major",<br>
"6" : "major",<br>
"7" : "minor",<br>
"8" : "minor",<br>
"9" : "trivial" ];<br>
<br>
main.d(56): Error: non-constant expression ["1":"blocker", "2":"critical",<br>
"3":"critical", "4":"major", "5":"major", "6":"major", "7":"minor",<br>
"8":"minor", "9":"trivial"]<br>
<br>
This is tedious, how long has it been now?<br>
Seriously, static map's are super-important, they should be able to be made<br>
immutable, and also be able to be initialised.<br>
<br>
Maybe this could be factored into the improvements for 2.065?<br>
</blockquote>
<br>
And even this works ok:<br>
<br>
immutable string[string] priorityMap = [<br>
"1" : "blocker",<br>
"2" : "critical",<br>
"3" : "critical",<br>
"4" : "major",<br>
"5" : "major",<br>
"6" : "major",<br>
"7" : "minor",<br>
"8" : "minor",<br>
"9" : "trivial" ];<br>
</blockquote>
<br>
Ohh, but non works on module scope, so yes, it would be fine to fix this<br>
</blockquote>
<br></div></div>
but enum works fine:<br>
<br>
enum priorityMap = [<div class="HOEnZb"><div class="h5"><br>
    "1" : "blocker",<br>
    "2" : "critical",<br>
    "3" : "critical",<br>
    "4" : "major",<br>
    "5" : "major",<br>
    "6" : "major",<br>
    "7" : "minor",<br>
    "8" : "minor",<br>
    "9" : "trivial" ];<br>
</div></div></blockquote></div><br></div><div class="gmail_extra">So it does... I didn't think of an enum AA ;)</div></div>