891
Rust (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] pheggs@feddit.org 2 points 4 days ago

not a big fan of rust personally. I think it would be much smarter to bring borrow checking to C through annotations. That way we would not have to rewrite the whole world

[-] originaltnavn@lemmy.zip 15 points 4 days ago

While I agree that would solve much of the motivation behind rewriting in rust, I don't think it would bring many of the rust-enthusiasts over to C. For me at least, the killer feature of rust is having a modern tooling and language with proper library management, functional stuff in the language and one language standard everyone agrees upon.

[-] Kushan@lemmy.world 15 points 4 days ago

I don't think it's about bringing rust enthusiasts to C, it's about the fastest way to bring more safety to the entire ecosystem.

I'm not convinced it's possible with just annotations, mind.

[-] pheggs@feddit.org 1 points 4 days ago

It is possible, it would bring in quite a few restrictions though. The bigger problem I see is that it wouldn't be entirely clear as an end user whether a program is memory safe or not. However, this isn't the case with rust neither. Maybe some kind of certification would help

[-] pheggs@feddit.org 1 points 4 days ago

Yeah, I don't think there's anything wrong with coding in rust for people who like it. But I do think it's quite a bit of useless work that could be spent more wisely on new products instead of rewriting things that we already have

[-] Oinks@lemmy.blahaj.zone 9 points 4 days ago* (last edited 4 days ago)

No C program is written to satisfy a borrow checker and most wouldn't compile with one, so adding it would require rewriting the world anyways. At that point why not choose a language that, in addition to being memory safe, also drastically cuts down on other kinds of UB, has sum types, sane error handling, a (mostly) thread safe standard library, etc.?

[-] jkercher@programming.dev 8 points 4 days ago* (last edited 4 days ago)

I don't think you would get much traction on C developers' existing projects. C gives you the option to do everything your way. If the developer's paradigm doesn't agree with the borrow checker, it could become a rewrite anyway.

Most projects don't use the newer c standards. The language just doesn't change much, and C devs like that. This might get a better response from the modern C++ crowd, but then you are missing a large chunk of the world.

[-] stingpie@lemmy.world 6 points 4 days ago* (last edited 4 days ago)

I struggle to learn rust because the semantics and syntax are just so awful. I would love to be enthusiastic about rust, since every seems to love it, but I can't get over that hurdle. Backporting the features into C, or even just making a transpiler from C to rust that uses annotations would be great for me. But the rust community really does not seem interested in making stepping stones from other languages to rust.

[-] pheggs@feddit.org 9 points 4 days ago

I learned a bit of rust and I think it's just about getting used to it. It's fairly subjective, and people say the same about C++. I also prefer the C syntax because I find it's simplicity extremely elegant and prefer it to have fewer features. And I like it for it's consistency, on linux the FHS is based up on C, and it just somewhat feels ugly to break that consistency.

But I also acknowledge the advantages of rust.

[-] banshee@lemmy.world 4 points 4 days ago

I've personally become pretty fond of the syntax and incorporation of FP features. In all fairness though, I haven't written much C or C++ for the last two decades.

Rust incorporates some of my favorite features from FP with handy green thread ergonomics. I'm not a fan of Go, so this gives me a great option for microservices when I can avoid Node.js.

[-] anton@lemmy.blahaj.zone 2 points 4 days ago

C++ already has much more of the required language constructs, which is why there is already an attempt to add borrow checking to C++ called circle. Until that standardizes, I wouldn't expect it in C.

this post was submitted on 10 Aug 2025
891 points (95.3% liked)

Programmer Humor

25699 readers
3060 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS