[Issue 5279] Function-static associative arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 26 15:50:27 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5279



--- Comment #3 from Jonathan M Davis <jmdavisProg at gmx.com> 2010-11-26 15:49:02 PST ---
So essentially, you want static local variables to have access to a static
constructor like all of the other variables with global lifetime do. Given that
that breaks the scoping rules, I'm not sure that it's exactly a good idea.
Perhaps allowing for a static constructor which is a nested function? That
seems a bit like overkill, but it could theoretically work. If CTFE were
properly advanced though, I don't think that it would be an issue. You'd either
assign the variable an AA literal, or you'd write a function which created one
and returned it, and you'd initialize the variable with that.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list