3 ms·
There are still unsafe constructs possible in GC’ed languages. I think we’re conflating GC with memory safety.
by kenjackson 2y ago
There are still unsafe constructs possible in GC’ed languages. I think we’re conflating GC with memory safety.
- mjburgess 2y agoWell some GC'd languages can take pointers to memory (eg., C#) -- even actually CPython can since it has the cffi/etc. stuff to do so. In general though, GC means automatic memory management which is effectively a kind of dynamic memory safety.
- advael 2y agoThis is a great example of a common problem, which I've taken to calling "intent-solution conflation". Garbage collection is intended as a way to improve memory safety in a programming language. It doesn't fully accomplish this, and that's an important distinction This is often more apparent (though a rampant problem nonetheless!) in policy decisions. Like how KOSA is supposed to "protect kids online" but what it mostly does as written is train people to get their identities stolen while making websites even more cumbersome than they already are. If I think it's a dumb bill, someone might say "What, you don't want kids to be safe?", as that's actually a lot of the point of calling it that