News for hackers. Stuff that matters.
Re:Matt Godbolt sold me on Rust by showing me C++ by alexchamberlain on Tuesday May 06, 2025 @02:12PM (#43908037)
I'm inferring that you think Rust adds too much brain drain? If so, what?
Re:Matt Godbolt sold me on Rust by showing me C++ by GardenLetter27 on Tuesday May 06, 2025 @02:28PM (#43908171)
The borrow checker rejects loads of sound programs - just read https://rust-unofficial.github.io/too-many-lists/

Aliasing rules can also be problematic in some circumstances (but also beneficial for compiler optimisations).

And the orphan rule is also quite restrictive for adapting imported types, if you're coming from an interpreted language.

https://loglog.games/blog/leaving-rust-gamedev/ sums up the main issues nicely tbh.

Re:Matt Godbolt sold me on Rust by showing me C++ by IshKebab on Tuesday May 06, 2025 @02:48PM (#43908370)
> The borrow checker rejects loads of sound programs

I bet assembly programmers said the same about C!

Every language has relatively minor issues like these. Seriously pick a language and I can make a similar list. For C it will be a very long list!

Re:Matt Godbolt sold me on Rust by showing me C++ by oconnor663 on Wednesday May 07, 2025 @03:46AM (#43913157)
> The borrow checker rejects loads of sound programs - just read https://rust-unofficial.github.io/too-many-lists/

It's important to be careful here: a lot (most? all?) of these rejections are programs that could be sound in a hypothetical Rust variant that didn't assert the unique/"noalias" nature of &mut reference, but are in fact unsound in actual Rust.

Re:Matt Godbolt sold me on Rust by showing me C++ by leonheld on Tuesday May 06, 2025 @02:58PM (#43908498)
I love Rust, but I after doing it for a little while, I completely understand the "brain drain" aspect... yes, I get significantly better programs, but it is tiring to fight the borrow-checker sometimes. Heck, I currently am procrastinating instead of going into the ring.

Anyhow, I won't go back to C++ land. Better this than whatever arcane, 1000-line, template-hell error message that kept me fed when I was there.