D 2015/2016 Vision?

Gary Willoughby via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 5 10:24:12 PDT 2015


On Sunday, 4 October 2015 at 22:49:59 UTC, bitwise wrote:
> And if I want to nest a class in a struct? or pass a class 
> around? and still have deterministic destruction?
>
> You can't nest a Scoped in a struct, and RefCounted doesn't 
> work on a class.
>
> It just shouldn't be this hard do such trivial things.
>
>    Bit

I think you can get a lot of mileage from using the following:

http://dlang.org/phobos/std_conv.html#.emplace
http://dlang.org/phobos/std_typecons.html#.scoped
http://dlang.org/phobos/std_typecons.html#.Unique



More information about the Digitalmars-d mailing list