4 ms·
Thank you for your feedback, I will amend my entry. > "Make functions, not procedures" --> "Don't check for errors. Don't even make it possible to check for er
by loup-vaillant 16y ago
Thank you for your feedback, I will amend my entry.
> "Make functions, not procedures" --> "Don't check for errors. Don't even make it possible to check for errors."
I will make my tutorial clearer on this point: errors can be embeded in results. Option types can do wonders. Of course, this is not easy to do in C.
My opinion is that programming in C means either dealing with legacy code, seeking utmost performance, or being nuts. I think that leaves plenty of room for reasonable programming. I never said that my assertion is valid in all circumstances. Actually I agree with you here. But I would be extremely surprised if my advice couldn't be followed by most programmers, most of the time.
- mfukar 16y ago"Of course, this is not easy to do in C." Actually, it's quite simple. The issue is that debugging becomes a bitch, and error codes are hidden even from the developer inside nested function calls - ie. you can't stop/recover from errors right away.