auto with array of strings (BUG?)
bearophile
bearophileHUGS at lycos.com
Thu Aug 20 07:17:22 PDT 2009
Justin:
>Is there a reason that the compiler makes the assumptions it does or is this a bug? I did try searching the bugzilla with a few different queries, but failed to turn up anything that looked likely.<
I don't know if it can be considered a bug, or just a design error. What I know is that it's a bug-prone feature of D1. It will be partially fixed in D2, but I'd like to see such feature changed in D1 too, that is I'd like array/string literals to produce dynamic arrays by default (and then to have another syntax to specify fixed-size arrays).
Dynamic arrays are more flexible and safer, so according to the D philosophy they have to be the default case :-)
Bye,
bearophile
More information about the Digitalmars-d
mailing list