Abstract
The purpose of this paper is to compare the exception handling mechanisms of Ada and Java. In order to be intelligible and useful to both communities, we have tried not to get into specific technical intricacies of the languages, perhaps sometimes at the cost of precision. Nevertheless, we decided to use the language-specific terminology whenever we write about a given language. We believe that the contrary would often lead to misunderstandings: a) the same term sometimes covers two different concepts, e.g. object, or b) when the concepts are basically the same, the features provided by the language can be largely different, making any unification impossible, e.g. task in Ada and thread in Java.Table 1 "Comparison of Terminology" shows the meanings and correspondences of the most important terms related directly or indirectly to exception handling in the two languages.We did not try to assess the merits of the two languages, not even with regard to exception handling. The issues are too many, and would by far exceed the scope of this paper: How to assess trade-offs between expressive power and performance, if ever a definite evaluation of performance is possible? How to assess language constructs whose "good" intent cannot be enforced? E.g. in Java, the "lazy" programmer can declare Throwable in a method's throws clause, instead of referring to specific exception classes. Where is the borderline between responsibility left to the programmer, and an admittedly error-prone construct in the language?Our goal was therefore to present facts, and facts only, as much as this is possible without any interpretation.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.