My thoughts & experiences with D so far, as a novice D coder

John Colvin john.loughran.colvin at gmail.com
Wed Mar 27 08:44:36 PDT 2013


On Wednesday, 27 March 2013 at 15:34:20 UTC, Vidar Wahlberg wrote:

> - The lack of "rectangular" arrays created at runtime in D 
> ("int i = 5; int[i][i] foo;") can be quite confusing for 
> programmers with Java or C++ background. Even though there 
> exists alternatives 
> (http://denis-sh.github.com/phobos-additions/unstd.multidimensionalarray.html), 
> this design decision and how to get around it when you really 
> desire a "rectangular" array could be explained in more detail 
> at http://dlang.org/arrays.html.


int i = 5;

auto foo = new int[][](i,i);


More information about the Digitalmars-d mailing list