compile-time variables?
BCS
ao at pathlink.com
Wed May 30 11:36:00 PDT 2007
Reply to David,
> BCS wrote:
>
>> Reply to David,
>> [...]
>>> 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?
>>
> How about the fact that resizing implies a dynamic allocation?
>
> Dave
>
the closest you can get to resize in meta land is "~" and that /is/ allowed
for strings.
| template Foo(char[] str)
| {
| const char[] Foo = \" ~ str ~ \"
| }
what specific problems exist for non char arrays that don't exist for char
arrays?
More information about the Digitalmars-d
mailing list