this post was submitted on 25 Mar 2024
14 points (69.4% liked)

C Programming Language

1150 readers
2 users here now

Welcome to the C community!

C is quirky, flawed, and an enormous success.
... When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd.
... The only way to learn a new programming language is by writing programs in it.

© Dennis Ritchie

🌐 https://en.cppreference.com/w/c

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] snowe@programming.dev 8 points 1 year ago (6 children)

Forking is a foolish idea. The core principle of computer-science is that we need to live with legacy, not abandon it.

what a crazy thing to say. The core principle of computer-science is to continue moving forward with tech, and to leave behind the stuff that doesn't work. You don't see people still using fortran by choice, you see them living with it because they're completely unable to move off of it. If you're able to abandon bad tech then the proper decision is to do so. OP keeps linking Joel, but Joel doesn't say to not rewrite stuff, he says to not rewrite stuff for large scale commercial applications that currently work. C clearly isn't working for a lot of memory safe applications. The logic doesn't apply there. It also clearly doesn't apply when you can write stuff in a memory safe language alongside existing C code without rewriting any C code at all.

And there's no need. Modern C compilers already have the ability to be memory-safe, we just need to make minor -- and compatible -- changes to turn it on. Instead of a hard-fork that abandons legacy system, this would be a soft-fork that enables memory-safety for new systems.

this has nothing to do with the compiler, this has to do with writing 'better' code, which has proved impossible over and over again. The problem is the programmers and that's never going to change. Using a language that doesn't need this knowledge is the better choice 100% of the time.

C devs have been claiming 'the language can do this, we just need to implement it' for decades now. At this point it's literally easier to slowly port to a better language than it is to try and 'fix' C/C++.

[–] lysdexic@programming.dev -5 points 1 year ago (3 children)

The core principle of computer-science is to continue moving forward with tech, and to leave behind the stuff that doesn’t work.

I'm not sure you realize you're proving OP's point.

Rewriting projects from scratch by definition represent big step backwards because you're wasting resources to deliver barely working projects that have a fraction of the features that the legacy production code already delivered and reached a stable state.

And you are yet to present a single upside, if there is even one.

At this point it’s literally easier to slowly port to a better language than it is to try and ‘fix’ C/C++.

You are just showing the world you failed to read the article.

Also, it's telling that you opt to frame the problem as "a project is written in C instead of instead of actually secure and harden existing projects.

[–] snowe@programming.dev 5 points 1 year ago

Rewriting projects from scratch by definition represent big step backwards because you’re wasting resources to deliver barely working projects that have a fraction of the features that the legacy production code already delivered and reached a stable state.

Joel's point was about commercial products not programming languages. I'm not the one misunderstanding here. When people talk about using Rust, it's not talking about rewriting every single thing ever written in C/C++. It's about leaving C/C++ behind and moving on to something that doesn't have the issues of the past. This is not about large scale commercial rewrites. It's about C's inability to deal with these problems.

You are just showing the world you failed to read the article.

sure thing bud.

Also, it’s telling that you opt to frame the problem as "a project is written in C instead of instead of actually secure and harden existing projects.

I didn't say that and you know it. Also it's quite telling (ooh, I can say the same things you can) that you think "better language" means "pet language". Actually laughable.

load more comments (2 replies)
load more comments (4 replies)