4 ms·
Why not use C instead? I see no benefit to use complicated language which cares about errors and then completely ignore that care.
by lisivka 10y ago
Why not use C instead? I see no benefit to use complicated language which cares about errors and then completely ignore that care.
- Rusky 10y agoBecause while you may not care at first, you will later, and Rust will help you out then.
- openasocket 10y agoYou're not ignoring errors with unwrap(): if there is an error, the program will print out a stack trace and exit. If you have some operation that could potentially fail but you know it won't (like if you are sure that node has a parent) what do you do? If the operation actually does return an error, it means what you thought to be true was wrong, and in some cases that means something has gone seriously wrong, and your program should immediately stop so you can debug it. You can try to handle the error yourself, using try! or the ? operator, but unless you plan to be able to recover from that error, or you want to output a more end-user-friendly error message than a stack trace, what's the point?
- deleted 10y ago[deleted]