> In D there are no built-in rectangular arrays. But probably a nD array struct will be added to Phobos in the following months. You may even write it yourself, for Phobos.
As a less nice alternative, you may use a dynamic array of dynamic arrays and use the function preconditions (design by contract) to assert with a loop that the inputs matrices are indeed rectangular. Bye, bearophile