3 ms·
Because it forces you to handle edge cases. Java is also harder than JavaScript because of this. Yes, the edge cases Rust forces you to handle are different t
by k__ 9y ago
Because it forces you to handle edge cases.
Java is also harder than JavaScript because of this.
Yes, the edge cases Rust forces you to handle are different than those of Java and probably make more sense to solve, but I think this is still the root of the "problem".
While edge cases are part of "the rule" they feel like exceptions of it.
Most of the time you write 80% of the program code in 20% of the time and the remaining 20% eats 80% of the time because of the edge cases.
In many cases you can simply ignore the edge cases, because well they will fail, but nobody cares 90% of the time. If the remaining 10% make too much problems, invest some time in workarounds, but 10% of the remaining 20% isn't that much, so this often will cost you also just 10% of the 80% of time.
If you can't ignore edge cases in your software, because even a 2% chance of people getting injured is a huge problem, you use Rust and fight with these cases.
- wasted_intel 9y agoYou can also opt to skip handling these edge cases by either copying (decreasing performance) or unwrapping (decreasing reliability). The great thing is that Rust gives you the choice.