convert static arrays to dynamic arrays and return, have wrong data.

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 9 02:34:37 PST 2014


AlanThinker:

> Is it possible to raise error when implicit convert static 
> arrays to dynamic arrays?
> Because there are really different.

To do this you need a sound tracking of memory areas. I think 
this is a "must have" for D, but so far D designers think 
otherwise.

If you just disallow that kind of operations indiscriminately, 
you reduce a lot the usefulness of D (because fixed size => 
dynamic slice array is a conversion useful in many cases) and 
probably force the introduction of many casts, and I don't know 
if this will increase the overall safety of the D code.

Bye,
bearophile


More information about the Digitalmars-d mailing list