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:

Where Next?

Popular Backend topics Top

AstonJ
I’ve seen more and more people get into Rust recently, so thought it would be cool to have a thread for people to share what they like ab...
New
bot
A new item has been posted: This thread was posted automatically, if you feel it could be in a better category and are at Trust Level ...
New
bot
A new item has been posted: https://crates.io/crates/rsfbclient This thread was posted automatically, if you feel it could be in a bett...
New
First poster: bot
This Python script mimics Babbage’s Difference Engine. In Use this Python script to simulate Babbage’s Difference Engine, Python offered...
New
First poster: bot
proposal: Go 2: permit types to say they may only be created by containing package · Issue #43123 · golang/go. It would be useful to per...
New
AstonJ
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first: asdf plugin-upd...
New
First poster: bot
Welcome to RETRO, my personal take on the Forth language. This is a modern system primarily targetting desktop, mobile, and servers, th...
New
jaeyson
Hi all!, anybody tried this Elixir quiz from @Tetiana? She’s the one who made Elixircards.
New
jaeyson
Sorry for the very vague noob question, I really want to ask this: When do we use async or sync code in the context of Elixir? AFAIK gen...
New
lucasvegi
Hello guys! Perhaps some of you have already seen this invitation on other channels in the Elixir community or even responded to our sur...
New

Other popular topics Top

Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
AstonJ
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me. I think the Planck and the Preonic (o...
New
AstonJ
Seems like a lot of people caught it - just wondered whether any of you did? As far as I know I didn’t, but it wouldn’t surprise me if I...
New
mafinar
Crystal recently reached version 1. I had been following it for awhile but never got to really learn it. Most languages I picked up out o...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
PragmaticBookshelf
Author Spotlight: Karl Stolley @karlstolley Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Karl ...
New
Fl4m3Ph03n1x
Background Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New