Re: rebindable static array

2010-09-02 Thread Simen kjaeraas
Michal Minich wrote: from high level point of view, there is difference in const(int)[2] and const (int [2]). One would expect that it is possible to rebind b. From low level/implementation point - there seems to be no difference because a and b are value types - there is not indirection. Poss

rebindable static array

2010-09-02 Thread Michal Minich
// Original question by Peter Alexander is at http://stackoverflow.com/ questions/3627023/how-do-you-initialise-an-array-of-const-values-in-d2 to summarize consider this code: const(int)[2] a; const int [2] b; const(int)[] c; const int [] d; void main () { a = [1, 2]; // Error: slice a[] is no