Hacker News new | ask | show | jobs
by worik 14 days ago
> IMO it's a worthwhile trade-off more often than a lot of people think

I am one of those people that like non GC'd languages also. The concept of the GC Pause bothers me

But my preference and "bother" are not business strategies. For most purposes, and in my professional life, garbage collection is a boon.

For my hobby programming I choose real time domains so I can flex my Rust coding for fun and not pointlessly.

1 comments

Today's GC languages with multi-threaded generational mark and sweep generally don't "GC pause". You can see slow downs if you hit a worst case, like accidentally churning your large object heap and/or long-lived generation too fast, but even then it is rarely a "stop the world" pause but a subtle competition for CPU cycles and memory bus but other parts of your application like network I/O might not even notice.
They are not useful for real time programming

Useful for most things

I saw .NET "Microframework"-based code running just fine on an RTOS decades ago. I've even seen CPython (ab)used on an RTOS.

Go back far enough and there were Real Time Lisps. (Not to mention Lisps even had hardware garbage collectors designed for them.)

Garbage collection can happen in real time programming just fine, there's just often not been enough demand for real time programming focused garbage collectors.

.NET "Microframework" didn't last not because it wasn't good at what it did, real time embedded programming, but because there weren't enough C++ developers interested in learning C# for embedded programming skills they already thought they knew.

They can be combined though, e.g. Bitwig is a famous DAW, written mostly in Java, only the audio processing pipeline and audio plugins are C++.