compile-time variables?

BCS ao at pathlink.com
Tue May 29 09:24:53 PDT 2007


Reply to David,

> 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.

Hmmm.

> 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).
> 

How is that? If everthing in meta land is pass by value (including strings) 
how are arrays any different than normal types?

> Dave
> 





More information about the Digitalmars-d mailing list