Idiomatic D using GC as a library writer
Sergey
kornburn at yandex.ru
Sun Dec 4 14:27:12 UTC 2022
On Sunday, 4 December 2022 at 12:37:08 UTC, Adam D Ruppe wrote:
> All of the top 5 most popular libraries on code.dlang.org
> embrace the GC.
Interesting. It seems that most of the community suppose that
“library” should be used from D :-)
But in my opinion - “foreign library experience” is much more
important. The usage of D is not that wide… but if it will be
possible to write library in D and use it from
C/++/Python/R/JVM(JNI)/Erlang(NIF)/nameYourChoice smoothly it
will be a win. Run fast (it could be Rust, Zig) extension/library
from more high level/less safe/slower dynamic languages. And not
only run but also write fast(here is D and Nim could be chosen).
Many languages do not have GC inside.. and others have their own.
And if your library is going to manipulate objects from other
languages with different memory management approach - it could be
tricky to do that with GC. You need to make that both GC become
friends
More information about the Digitalmars-d-learn
mailing list