A problem with AAs
Robert Fraser
fraserofthenight at gmail.com
Thu Jan 24 16:39:18 PST 2008
Jarrett Billingsley wrote:
> Most of this stems from them trying to be binary-compatible with C arrays.
> They are allocated on the stack, you can't return them from functions, and
> passing them passes a pointer. I have no idea what's up with .init (D1's
> std.traits actually takes advantage of this oddity to determine if a type is
> a static array!), and the no-ref-out thing is weird. I mean, it's because
> you can't reassign what a static array variable points to..
>
I'd be fine with all that if string (and other array) literals were
dynamic by default.
More information about the Digitalmars-d-learn
mailing list