> Yeah, I agree with Vas a lot more than the original article. Exceptions instead of > error codes my @$$ - clearly someone who's never dealt with an embedded environment.
I have mixed feelings about this. I find exceptions can be extremely handy, I've even implemented them in C. However they make it very easy to get into the habit of writing code that has bad error checking.
After you have added all the required exception handling then sometimes the code can look just as untidy as checking and returning error values. Except you don't decrease the range of your return values in the process.
It goes hand in hand with the finish each function idea. Sometime it's easier to grow a system as you can test it quicker but you have to go back and finish your code. You always have to do the work at sometime & going back is boring.
If you don't care whether it works properly or not then it's probably easier to just hack code as you go along and not worry if something might fail. I think that really is the future of software development.
smf
|