News for hackers. Stuff that matters.
Re:Organizations Using the D Language by zozbot234 on Tuesday February 16, 2021 @05:35PM (#26159643)
> The idea of having a language that can work with or without a garbage collector in different part of a code ... How can this even work in practice ?

"Pluggable" GC-based arenas could make it work quite well. People routinely use ECS (entity-component systems) frameworks in GC-less languages like Rust that could mesh quite well with GC.

You do need some extra glue to harmonize the GC-based and GC-less paradigms (such as adding new "GC roots" for any GC'd objects that are being kept "alive" via links from non-GC ones, and demoting them when the references are dropped) but it's quite doable. Rust will probably get facilities for this once "local allocators" are added to the language in a reasonably stable form.

There are no comments on this comment yet.