[Lavanya Deepak] Lavanya Deepak
Technology for Better Business and Higher Standards of Life

Wednesday, October 08, 2008

Cool Java Feature Desired in Other Languages

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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home