Hacker News new | ask | show | jobs
by jordigh 2795 days ago
This is a sore point for me in D. Assoc arrays in D don't work at compile time. It's a really longstanding issue:

https://issues.dlang.org/show_bug.cgi?id=1578

It's a real shame because I prefer just about everything else about metaprogramming and compile-time evaluation in D over C++.

1 comments

You can write your own in D though.
I don't know how to yet. And if this is possible, is it also possible to fix standard assoc arrays?
> is it also possible to fix standard assoc arrays?

AFAIK, yes, it's just that nobody has done that yet.

The D runtime was written before there were templates, and it shows.