Dare Obasanjo: Checked vs. Unchecked Exceptions Again. I agree partially with both positions, but I don't believe that they go far enough. If you believe in design by contract, then pick a language like Eiffel in which you can declare all of your pre and post conditions.
On the other hand, the logic that a system should not fail at compile time but should only fail when presented with unexpected conditions at runtime can also be applied to strong typing. Languages like SmallTalk support this latter paradigm.
While by training, I am in the former camp, I'm increasingly finding myself resonating with the arguments made by latter camp. What makes this work is a switch from "it compiles, check it in" to "it passes all tests, check it in". All too often, I see people making exceptions to this "just this one time", and my experience has been that it rarely works out. JUnit, NUnit, and PyUnit are your friends.
While Java and C# battle over who is the rightful successor to C++, it is quite possible that a language like Python (or, dare I say it, Ruby) will ultimately be the one that wins out.
2:19:43 PM Comment
|
|