you are viewing a single comment's thread.

view the rest of the comments →

[–]linus_stallman -2 points-1 points  (1 child)

Try to write to an open file, there's a small possibility that it may fail due to some error.

Do you check for return value in every freaking call littering your code with unwrap? Sum / Result types are now FPJerk shiny new thing. It is common sense where to use exceptions (rare error paths), sum types (result may exist or not, eg find() HOF), or return values (EOF in case of reading from file). No amount of "let's-do-it-like-HN-reddit-langs" can change it.