Michel Fortin:
> This is just too restricting. Do we really want to have to 
> create two versions of test(), one with a safe delegate the other with 
> an unsafe one?

What's the point of having safe code? If safe code can run unsafe code in a so 
simple and clean way (with no casts, etc), then there's little point in having 
safe annotations.

Extra notes:
- In some situations with a bit of flow analysis the compiler can avoid to test 
the safe bit of the pointer.
- If the D compiler gets good at separating safe code from unsafe one at 
compile time, then then GC might even move safe class instances in memory. I am 
not sure.

Bye,
bearophile

Reply via email to