Posted by : Deepak Vasudevan Wednesday, October 08, 2008

Cool Java Feature Desired in Other Languages

In the Java language exception handling, I like the way the compiler demands you to handle exceptions. You have two choices:

  1. Handle the exception yourself
  2. Declare that the method/class would throw the exception at the declaration level.

This way, I feel the code would be more disciplined. With our C#, the runtime takes the onus on the pretext of giving flexibility to the developer. But the downside is that lazy developers leave some conditions unhandled and as a result, the users would be caught unaware with dreaded yellow screens and error pages. Just thought, if there is a way at least if application frameworks could bring in this feature or if future versions of C# compiler try including a support for this throws construct.

Popular Post

Blogger templates


Blog Archive


Blog Archive

Powered by Blogger.

- Copyright © Lavanya Deepak -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -