Idiomatic D using GC as a library writer

Adam D Ruppe destructionator at gmail.com
Sun Dec 4 22:16:46 UTC 2022


On Sunday, 4 December 2022 at 21:55:52 UTC, Siarhei Siamashka 
wrote:
> Do you mean the top of the 
> https://code.dlang.org/?sort=score&category=library list?

Well, I was referring to the five that appear on the homepage, 
which shows silly instead of emsi containers.

> How do you know that they embrace GC?

I looked at the projects. Except for that arsd-official thing, 
that's a big mystery to me, the code is completely unreadable.

But vibe and dub use it pretty broadly. Unit-threaded and silly 
are test runners, which isn't even really a library (I find it 
weird that they are consistently at the top of the list), so much 
of them don't need the GC anyway, but you can still see that they 
use it without worry when they do want it like when building the 
test list with ~=.

emsi-containers is built on the allocators thing so it works with 
or without gc (it works better without though as you learn if you 
try to use them.)

> Is it possible to filter packages in this list by @nogc or 
> @safe compatibility?

No. I do have an idea for it, searching for @nogc attributes or 
attached @nogc unittests, but I haven't gotten around to trying 
it.


More information about the Digitalmars-d-learn mailing list