←back to thread

611 points LorenDB | 5 comments | | HN request time: 0s | source
Show context
markus_zhang ◴[] No.43908006[source]
What if we have a C that removes the quirks without adding too much brain drain?

So no implicit type conversions, safer strings, etc.

replies(10): >>43908024 #>>43908037 #>>43908071 #>>43908130 #>>43908141 #>>43908193 #>>43908341 #>>43908840 #>>43909556 #>>43913099 #
1. alexchamberlain ◴[] No.43908037[source]
I'm inferring that you think Rust adds too much brain drain? If so, what?
replies(2): >>43908171 #>>43908498 #
2. GardenLetter27 ◴[] No.43908171[source]
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.

replies(2): >>43908370 #>>43913157 #
3. IshKebab ◴[] No.43908370[source]
> 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!

4. leonheld ◴[] No.43908498[source]
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.

5. oconnor663 ◴[] No.43913157[source]
> 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.