Thoughts from newcommer

Jack Stouffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 17 08:10:59 PDT 2017


On Monday, 17 April 2017 at 02:56:00 UTC, Jerry wrote:
> Okay, only one container, and happens to be most simple basic 
> one. The others aren't nogc and some of them are even classes. 
> Not only that, Array wasn't @nogc until about a month ago.
>
> No idea what you mean about goal posts. Do you mean it's not an 
> issue worth discussing? You made a false claim, and you still 
> you are still persisting in it as if having a single container 
> be @nogc solves the entire issue.

The first question was whether D had RAII or not. When it was 
shown that D does have RAII, then the goal posts were moved back 
to D needing RAII containers that cleaned up their elements on 
scope exit. When it was shown that D absolutely has RAII 
containers (that clean up all resources including GC ones on 
scope exit) then the goal posts were moved back yet again to the 
containers needed to be @nogc containers. This is despite the 
fact that @nogc has nothing to do with RAII and is just something 
people want for convenience.

We are now nowhere near the original topic. I'll cut this off at 
the knees and say If you want @nogc RAII containers that work 
with std.allocator then just use 
https://github.com/economicmodeling/containers


More information about the Digitalmars-d mailing list