https://issues.dlang.org/show_bug.cgi?id=13685
--- Comment #1 from bearophile_h...@eml.cc --- If arrayShape returns a specialized struct instead of a generic tuple, then it's possible to add a method to the struct (otherwise a free function that takes a tuple is acceptable using UFCS), like "allocate", that allows to create an array of given shape: auto a1 = new int[][](10, 5); auto s1 = a1.arrayShape; auto a2 = s1.allocate!double; // 2D matrix of NaNs doubles. assert(a1.arrayShape == a2.arrayShape); auto a3 = s1.allocate!double(5.0); // Initialized to 5.0. assert(a1.arrayShape == a3.arrayShape); auto a4 = s1.allocate!double((r, c) => r * c); // Initialized to r*c. assert(a1.arrayShape == a4.arrayShape); --