pillaiindu

pillaiindu

Are garbage-collected languages good for system programming?

I have heard many times that languages with a garbage collector aren’t great for system programming. Today I saw a book titled “Hands-On System Programming with Go”.

Is Go or any other garbage collected language good for system programming? What are the pros and cons of using a garbage collected language for system programming?

Is the development of Docker (which is developed in Go) considered as system-programming? Or does system programming only mean developing things like Kernel and other low level things etc.

Most Liked

OvermindDL1

OvermindDL1

It’s not necessarily overhead in some terms. Some GC’s try to keep memory low, often using things like stop-the-world collection or eating up another thread needlessly to keep it down. Some GC’s try to keep pauses minimal (like Go) so their memory can grow unbounded in many situations (and low pause is not no-pause). Python is interesting as most of its memory allocation is handled by smart pointers so they get evicted immediately, but it still has a loop scanner that runs on occasion for when people make memory loops. Many/most GC languages also don’t let you control when memory is released, or even from where you can get the memory in the first place, which is extremely important on some arch’s.

In short, GC’s just add some cost to a program that you generally don’t want on system languages. As well as GC’s only handle the resource known as ‘memory’, other resources like file or socket handles, PIN access, etc… still have to be done either manually, or if the language allows some kind of finalizer then you can let the resource be GC’d “eventually”, which is really bad on some resources.

Having a language that can handle any resource with no runtime cost is preferred.

AstonJ

AstonJ

I think it’s because of the overhead impacting memory and performance. Languages like C and Rust operate much closer to the metal, so trade convenience and features for speed and performance.

I don’t have much experience here so maybe @OvermindDL1, @NobbZ, @Qqwy or others can offer a better explanation :smiley:

pillaiindu

pillaiindu

Thank you @OvermindDL1 for the insights! :heart:

Popular Backend topics Top

AstonJ
Partly interested in this so we can set up tags, but also because I’m out of touch with which frameworks are hot right now and I’m curiou...
New
New
New
New
First poster: bot
Rust 2021 Roadmap by Mark-Simulacrum · Pull Request #3037 · rust-lang/rfcs. The focus of this year is on project health, specifically as...
New
AstonJ
Inspired by this post by @stefan.jarina, I’m curious about the kind of Bash scripts you’ve written and whether you still use Bash given t...
New
mafinar
I did not add this to a “this weekend I’ll learn” like my few other journals as I am decided on using this in the long term. Last I work...
New
jaeyson
Hi all!, anybody tried this Elixir quiz from @Tetiana? She’s the one who made Elixircards.
New
Reinis
I’ve been diving into Bridgetown (a Jekyll successor) and learning about writing a more maintainable CSS.
New
KnowledgeIsPower
Do you just use plain Terraform alone? Do you use CDK for Terraform or other supporting tools (e.g. Terraform Cloud ) for Terraform?
New

Other popular topics Top

AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
foxtrottwist
A few weeks ago I started using Warp a terminal written in rust. Though in it’s current state of development there are a few caveats (tab...
New
PragmaticBookshelf
Build efficient applications that exploit the unique benefits of a pure functional language, learning from an engineer who uses Haskell t...
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New
OSZAR »