News for hackers. Stuff that matters.
Re:Generics can make your Go code slower by bborud on Wednesday March 30, 2022 @04:27PM (#30860371)
Let’s start at the beginning. What is a «systems language» and for what is it typically used?
Re:Generics can make your Go code slower by imtringued on Thursday March 31, 2022 @05:02AM (#30865210)
Colloquial language is the worst. When I hear people say systems language I imagine that they dropped the "operating" before "systems language", meaning a language that can be used to build an operating system with commonly expected performance characteristics and low resource intensity.
Re:Generics can make your Go code slower by sophacles on Wednesday March 30, 2022 @05:40PM (#30861149)
A systems language is a language used (typically) to write systems :P

Jokes aside, this is kind of a fundamental problem with the term, and many terms around classifying programs. Also worth noting - "program" is a term that is a lot looser than people who typically live above the kernel tend to think.

Re:Generics can make your Go code slower by bborud on Thursday March 31, 2022 @04:09AM (#30864936)
I would argue that the area the term might apply to has widened over the years, so there is more room for languages that don't do things that require more explicit management of resources like memory.

Also, given the number of times per week that my CPU fan spins up because of some daemon that misbehaves on macOS, I would also argue that whatever makes system programmers produce higher quality code would be better than having people who struggle with C/C++/Objective-C write daemons that blow up all the time.

After ~5 years of Go, I think it is an important systems language simply because it is easier to write reasonably performant software in with a lower chance of silly mistakes that makes it blow up.

After ~35+ years of programming I also think that the notion of "fast" when used about languages is a bit silly because that isn't where most performance actually comes from. Not in actual real life. Most performance tends to come from picking the right idea and then implementing it efficiently and without too many silly mistakes. It doesn't help you if you use a language like C or C++ when you end up doing more work due to poor algorithm or design choices, or you fail to exploit the parallelism your computer is capable of. And you will make poorer choices if much of your cognitive capacity is tied up in just keeping the car on the road.

As we speak I'm working on a system where we just moved a bunch of higher order functionality out of firmware and into a server just because producing an acceptable quality implementation of that functionality in the firmware takes about 4-5 times as long. I am pretty sure a high quality implementation just wasn't going to happen regardless of how much time you sunk into it. That's the kind of real-world problems where better choices have actual impact.

We kind of have to relate to reality. The reality in which my mac keeps having daemons blow up because whoever wrote it didn't didn't manage to do a good job. It doesn't help that C/C++/Objective-C is a systems language when people write software that doesn't work in it. And that happens. With annoying regularity.

Sure an expert C/C++ programmer can probably do better than an average or even reasonably good Go programmer. But I've been at this for 35+ years and in my experience, the C/C++ programmers that can consistently write correct, understandable and performant software are much rarer than people tend to believe. It doesn't help to have more performance potential when most of that potential is outside the reach of most practitioners.

People tell themselves all manner of stories about which is better, A or B, but the only useful metric is what quality software comes out the other end of the pipeline. It isn't always what you wish it to be.

(I have hopes that Rust might replace C/C++ on embedded platforms. But for a lot of systems work, Go is just fine by me. Whatever enables people to write software that works better)

Re:Generics can make your Go code slower by jokoon on Thursday March 31, 2022 @01:04PM (#30869626)
Something that is used to write an OS, low level programming, low memory footprint, high performance/optimized.
Re:Generics can make your Go code slower by yencabulator on Saturday April 02, 2022 @09:05PM (#30893232)
Please accept that that's your opinion. https://en.wikipedia.org/wiki/System_software
Re:Generics can make your Go code slower by bborud on Thursday March 31, 2022 @05:05PM (#30872196)
When you say OS, do you mean kernel or kernel and the daemons?
Re:Generics can make your Go code slower by jokoon on Friday April 01, 2022 @05:50AM (#30876582)
Both.

Also everything that has low memory, like embedded systems.

Anything that is real time cannot have a GC, because GC are unpredictable. So everything in aircraft, space, when it has time sensitive machinery...

Re:Generics can make your Go code slower by bborud on Sunday April 03, 2022 @02:59PM (#30899627)
Anything that can't have a gc probaly can't use a regular memory allocator either (since they aren't necessarily easy to predict). So you would be left with static allocation and stack variables.
Re:Generics can make your Go code slower by yencabulator on Saturday April 02, 2022 @09:06PM (#30893240)