RCArray is unsafe

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Wed Mar 4 04:19:42 PST 2015


Walter Bright:

> How do you type an an array of pointers with different owners?

"Sound" doesn't mean it should be able to do everything. It will 
be just an approximated model. It means it's going to forbid some 
valid code, just like every type system. You use some @system 
code to work around some of those limitations. And if the design 
is good, such islands of unsafety are located inside Phobos 
constructs that leak 
(http://en.wikipedia.org/wiki/Leaky_abstraction ) very little.

Bye,
bearophile


More information about the Digitalmars-d mailing list