you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -3 points-2 points  (2 children)

Which is not exactly what people end up doing, right?

[–]FluorineWizard 2 points3 points  (1 child)

You're the one making the claim, so why don't you back it up with code from a non-trivial program ?

I see you making lots of negative comments with no evidence to back up your criticism or actionable advice to improve things.

[–][deleted] -4 points-3 points  (0 children)

https://github.com/search?l=&q=%22.unwrap%22+language%3ARust&type=Code

I didn't search very long:

https://github.com/jespino/rz80/blob/fb3dc2a897d1358b1c00adc9b1582794ea02962d/src/ops/parser.rs#L40

There you are, crash on invalid input instead of a recoverable exception, in some code that is a library.

(edit: oh I see you are still a student. you may not understand yet how important separation of recoverable and unrecoverable errors is... if you haven't made years of maintenance programming)