Conversation

My strong feeling is that the "memory safe systems programming language that's easier to use than Rust" that everyone wants is going to have to have something that looks a lot like a garbage collector. There's a lot of room to design a fast GC for "systems-like" patterns.
35
369
You could imagine a system that integrated tracing GC for language-native objects with reference counting, or conservatively scanned C heaps, for FFI objects, for instance.
6
65
Replying to and
so the standard we could do with is a standard marker in a thread local for "don't migrate this stack to somewhere else", with some push to get common libraries to implement the guards.
Replying to and
nginx has a variant of JS (njs) that's scoped to web server requests so there's mostly no use for doing GC. You can use arrays, objects, closures, etc. It allocates with the usual nginx thread-local allocation pools and then all of the JS memory is freed when the request ends.
3
Replying to and
Barriers are quite cheap, and rarely synchronise (when you run out of thread-local queue in the slow path e.g.) dl.acm.org/doi/10.1145/24 It's more tracing that gets you; thread-local GC is a worthwhile idea - fitting a nursery in cache would make scanning it fast.