Isn't checked Exceptions what we really want?
It has been decided to leave checked Exception out of the .Net framework.
The reason for doing this is that is that it should easier to change versions without recompiling. This to me sounds like late binding. I might as well go back to scripting.
I like checked exceptions because it forces you to design your code beforehand and ensures you that you have considered all error conditions.
More or less I want to keep track of less things in my head and let the compiler check my code for consistensy whereever it is possible.
Further more, when you talk about pluggable architecture, you want your plugins to follow certain rules. This is a perfect scenario where you really really benefit from checked exceptions.
Please put checked exception in .Net!
Well... Why not?
ReplyDeleteIf I add new exceptions, the program will still be broken until I fix it. I don't want broken programs.
It is not an option to document what exceptions you throw with checked exceptions. This is forced upon you. This means that you know what exceptions 3rd party modules throw before hand.
On top of that it gives nice intellisense features.
It's like saying: I don't like that the compiler checks if the methods I use actually exist.