typeof([2,2]) !=? int[2]
bearophile
bearophileHUGS at lycos.com
Fri Mar 8 14:59:37 PST 2013
This is an answer to just your title question.
A lot of time ago typeof([2,2]) was int[2]. This was efficient,
but in most cases this was a source of troubles and bugs. So now
a [2,2] is a heap-allocated dynamic array of type int[]. Some
persons have askes for a fixed-sized array litera, like s[2,2]
but nothing has happened on this so far.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list