Hacker News new | ask | show | jobs
by pdimitar 1317 days ago
Alright, this is getting tiring.

Zig, Nim, Rust, D, V, whatever -- can't we just move on from C/C++ already? It's obvious they are not up for the job.

2 comments

I do wonder if a dependently typed language like Agda or Idris would be a better choice for something like sudo. They are not terribly slow (to run), by today they are well-understood, and they can formally prove invariants about the program.
Could be. Having both strong static typing (and a more formal one) and less code will help a lot.
C and C++ are far from the same thing. That said, D does seem kinda nice so I wouldn't mind seeing some rewrites of critical infrastructure in it. Preferably something that'll benefit more from the rewrite than ls would.
Sure C++ is a tad better than C but compared to e.g. Rust and Zig it's pretty convoluted and verbose when trying to achieve things that they achieve with 2-5 liners.

And even if modern C++ is amazing -- I have no doubt it's improving all the time -- that doesn't change the fact that there are metric tons of C++ code out there that nobody will ever modernize. So C++ getting improved with time is sadly an almost moot point.

I'd personally advocate for Rust but I've heard people say there are a few other languages that allow you to achieve the same memory safety so, by all means, let's please start rewriting and make our everyday tools something different than a Swiss cheese of potential and actual security threats. It really is time.

The language doesn't matter, the outcomes do. And in terms of outcomes I maintain that C and C++ have not stood the test of time in terms of security and amount of foot guns. Too much sentimental value is attached to them as well and that doesn't help matters either.

We work with tech. We don't make love with it. We should all start acting like this is a job and not [only] a hobby.

> Sure C++ is a tad better than C but compared to e.g. Rust and Zig it's pretty convoluted and verbose when trying to achieve things that they achieve with 2-5 liners.

yeah, if one is stuck in C++98 mentality.

Like a ton of existing C++ code out there? :P

I don't make the rules, sadly I've been forced to leave code to never be upgraded again. I imagine it happens to many others.

Like a ton of code out there written by folks that don't care to update themselves, or not seen as business value to rewrite.

That doesn't change the fact how the recent versions of those languages look like in 2022.

I don't think we disagree because both of what we say is true at the same time. It's not either/or.