Currently, given an array:

   alias T[3] A;
   A a;

the default initializer for A, A.init, is T.init. It is done this way for memory efficiency, as:

   a = A.init;

doesn't need to create an array for the rvalue. But it does cause generic programming problems, especially with the advent of static arrays now being passed by value rather than by ref.

So, I propose changing A.init from being T.init to being [T.init, T.init, T.init].

What do you think?

Reply via email to