Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>doesn't include the error handling that is constantly necessary in C

I mean, I'm sure there are some cases, but how many C programs are capable of gracefully recovering from a malloc failure? Probably very few. If the program is going to crash anyway...



I don't agree at all, but even if I did, that's only one of tons of cases. There are plenty of very recoverable errors which aren't handled by example code you copy off the internet, but which you really should be handling.

Take networking code for example: do you really want to be dying without a visible reason because you didn't check `errno` and do a retry? This is really basic stuff.


... best to do it deterministically and immediately! Easier to test, and no chance that an obscure preallocation leads to crashes elsewhere in the program.


It has nothing to do with being able to recover. It's about not continuing with unknown state.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: