Array literals MUST be immutable.

Walter Bright newshound1 at digitalmars.com
Wed Feb 17 01:17:09 PST 2010


Don wrote:
> This is for me the last remaining D2 issue.

That would make it difficult to do things like:

   int*[] foo(int *p)
   {
     return [p, p + 1];
   }

as all the elements of the literal would also have to be immutable. I 
think you've made a good case, but there is also this issue.



More information about the Digitalmars-d mailing list