compile-time variables?
David B. Held
dheld at codelogicconsulting.com
Mon May 28 11:13:18 PDT 2007
BCS wrote:
> [...]
> why is it just char[], why not T[] for any T that can be used by it's
> self? I have some cases where I want to do that.
I don't know the full story, but after looking through the front-end
code, my guess is that it's just easier that way. That is, when
checking to see whether a particular type can be a compile-time array,
it's easier to check against one type than against a set of types, or
detect a set of type properties. Also, since dynamic char[] already
violates the purity of metaprogramming, I think that Walter didn't want
to expand and encourage that without thinking very hard about it (it's
easier to give people new features than to take them away).
Dave
More information about the Digitalmars-d
mailing list