Why is `scope` planned for deprecation?

via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 13 02:26:30 PST 2014


On Thursday, 13 November 2014 at 10:00:10 UTC, Ola Fosheim 
Grøstad wrote:
> GC ptr: release() and move() are dummies.

Well, "move()" should obviously not be a dummy, but just a 
regular assignment that requires the object to be GC allocated…

What I am saying is that D needs type-classes for pointers so 
that you can write generic functions can be ignorant to specific 
allocation schemes and specify their minimum requirements. It 
basically means that in @safe code all raw pointers are 
"borrowed" and all owned pointers requires specification tha is 
either concrete (gc,shared,unique) or a templated generalization 
(single ownership, multiple ownership etc).

It seems a perfect for D to extend templates with more power and 
make good use of it now that C++ adds concepts.




More information about the Digitalmars-d mailing list