I’m using the D language, and would like to get the default value of a generic type, similar to the way default(T) works in C#. Is this possible? If not – what are the possible workarounds?
I’m using the D language, and would like to get the default value of
Share
I think
T.initmight be what you’re looking for.