▲ | K0nserv 3 days ago | |||||||||||||||||||||||||
I mostly don't agree with this take. A couple of my quibbles: "Cognitive overhead: You’re constantly thinking about lifetimes, ownership, and borrow scopes, even for simple tasks. A small CLI like my notes tool suddenly feels like juggling hot potatoes." None of this goes away if you are using C or Zig, you just get less help from the compiler. "Developers are not idiots" Even intelligent people will make mistakes because they are tired or distracted. Not being an idiot is recognising your own fallibility and trying to guard against it. What I will say, that the post fails to touch on, is: The Rust compiler's ability to reason about the subset of programs that are safe is currently not good enough, it too often rejects perfectly good programs. A good example of this it the inability to express that the following is actually fine:
which leads to awkward constructs like
| ||||||||||||||||||||||||||
▲ | mattwilsonn888 3 days ago | parent | next [-] | |||||||||||||||||||||||||
To contradict you: avoiding false positives (programmer is correct, compilation fails anyways) by refactoring code into the second or third best design, is exactly the type of cognitive overhead that deserves to be vindicated when complained about. It can fundamentally changes the design of the entire codebase. I believe that explains why many game developers, who have a very complex job to do by default, usually see the Rust tradeoff as not worth it. Less optionality in system design compounds the difficulty of an already difficult task. If The Rust Compiler never produced false positives it should in theory be (ignoring syntactic/semantic flaws) damn-near as ergonomic as anything. Much, much easier said than done. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | dayvster 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
this is an excellent example do you mind if I examine it a bit closer and perhaps use it in my article? | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | Svoka 3 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Looking at your code I have more confidence that quoted statement is false. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | 3 days ago | parent | prev [-] | |||||||||||||||||||||||||
[deleted] |