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
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
AstonJ
Or which features of current frameworks you use you feel you couldn’t live without?
New
New
New
New
finner
Just wondering how many devs out there are using Spring Reactive, specifically WebFlux?
New
finner
I’ve never really felt 100% comfortable using the enum type because of my lack of understanding how it is constructed . . . . . . until ...
New
Jsdr3398
I just thought of this. Are there any disadvantages when making your server in Assembly (other than having to learn a bunch of stuff :ro...
New
mafinar
We always have fun in this forum around this time of the year, discussing the days’ (or yesterdays’) challenges and talking through solut...
New

Other popular topics Top

Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
New
AstonJ
There’s a whole world of custom keycaps out there that I didn’t know existed! Check out all of our Keycaps threads here: https://forum....
New
New
AstonJ
If you are experiencing Rails console using 100% CPU on your dev machine, then updating your development and test gems might fix the issu...
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
PragmaticBookshelf
Build highly interactive applications without ever leaving Elixir, the way the experts do. Let LiveView take care of performance, scalabi...
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
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