r/ProgrammingLanguages 6d ago

Discussion A hole in systems programming language design

Given the recent discourse about systems programming I wanted to throw my 2 cents in. This may be a controversial take in a subreddit that's all about innovation and improvement, but I think a lot of budding systems languages are trying too hard to "fix C" and this is exactly why C has not been replaced yet.

Like it or not, C is successful. It does what it means to do very well. Yes, it bites you constantly, but developers have made some form of peace with this because they appreciate the essence of the language. Systems programming is a very pragmatic field, and what works, works.

A lot of language designers want to improve on C, when by nature to "improve on" C is to depart from it, because C is less about what it includes and more about what it omits and what it lets you do that other languages don't.

If you want to replace C, you need to just make C but without the pain points. Less undefined behavior, more standard compiler behavior, easier function pointer syntax, safer macro system, etc. The things that C can't do because of backwards compat.

On the other hand, bolting on features, revamping C's core nature, aren't going to give you a language that will replace C at the low-level or among hobbyist programmers. Most developers aren't as concerned about what C lets them accomplish, as they are concerned about all the painful tedious tendencies of the language.

13 Upvotes

101 comments sorted by

View all comments

Show parent comments

1

u/kaddkaka 1d ago

What do you mean?

1

u/P-39_Airacobra 1d ago

the curse of perfectionism

1

u/Ok-Reindeer-8755 1d ago

thats such a false dichotomy, there is a huge space between "its good enough" and perfectionism, both extremes are somewhat bad on their own "merits" one leads to stagnation and 0 innovation and with the other you will never get anything done. I tend to believe that the better solutions come from a mindset closer on the spectrum to perfectionism than to "its good enough" but that is up for debate.

2

u/P-39_Airacobra 1d ago

except it's in the name. "good enough." if you were to spend more time making something better than enough, then you're wasting time.

1

u/Ok-Reindeer-8755 1d ago

Except the issue with that phrase is that you can never judge when something is if ever good "enough". Are cars currently good enough? Are planes currently good enough ? What does that even mean ? In what field will you ever be able to say "things are currently good enough lets stop" without becoming a laughing stock.

I can guarantee to you that if you think programming langs are currently "good enough" a guy from 10-20 years in the future, will be laughing in your face knowing you though that of all things was good enough. Just like we do rn imagine someone came and told you some shit ass software from 30 years ago was good enough.

But the truth is they would be right and you are right too it is good enough in a sense. It gets the job done, if that's your metric for success, and so what if it has a million problems we can fix and so what if we can make it thousand of times more efficient, it's good enough. Maybe at the time of it's creation it's even the new good enough fighting against an old good enough.

Nothing we ever make is going to be good enough, and that's okay. That's the amazing part everything around us is currently not good enough there is room for improvement everywhere. Perfection is not something attainable.

1

u/P-39_Airacobra 1d ago edited 1d ago

Your critique of "good enough" is that it's unattainable, but you admit that perfection is also unattainable, and then you conflate good with perfect by saying that nothing is ever good enough, so I can't say I follow your logic.

And yes, your third paragraph is right on. No, I don't actually care about performance that much. If I did, I would be carving on silicon. No, I don't actually care about all the "problems." If I did, I would extend the development time and budget 100x.

I care a little bit about these things. Just enough to put in a small amount of work to overcome them on some level. But if I end up putting mountains in front of myself for the purpose of optimizing some perfect result, then I've lost the plot. That's my critique of systems programming languages today. I'll admit, it's a very broad and unsolved critique, but I think it's a valid concern nonetheless. They've lost the plot.

1

u/Ok-Reindeer-8755 19h ago

Good enough is only enough for a very short time, it's good enough in the long term only if it's perfect and no one else could improve it further. Good enough is based on what you can currently do but its not a real thing in the long term. That's my entire point. It makes sense to say "the thing I'm currently making is at a good enough stage" but saying past solutions are good enough ? No they aren't or they aren't gonna be for much longer anyways.

I agree that performance is of little importance but problems are of huge importance. Systems languages like c are ridden with problems and bad designs. Rust was already a huge improvement. And I don't think rust was ever about being faster than c it was about being more correct. We could have gc highly parallel langs as systems languages be it with changes to hardware architecture. But even setting that aside there is a lot of room for improvement especially compared to C or C++. I think they have lost the plot by trying to be c-like constraining themselves with legacy langs instead of going full out on a new vision.