A Comparison of the Object-Oriented Features of Ada 2005 and JavaTM

  • Authors:
  • Benjamin M. Brosgol

  • Affiliations:
  • AdaCore, New York, USA NY 10011

  • Venue:
  • Ada-Europe '08 Proceedings of the 13th Ada-Europe international conference on Reliable Software Technologies
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Ada 2005 and Java offer comparable Object-Oriented Programming ("OOP") support, but exhibit significant differences in both their general philosophies and their specific features. Each language allows the programmer to define class inheritance hierarchies (including a limited form of multiple inheritance through "interfaces") and to employ encapsulation, polymorphism, and dynamic binding. Whereas OOP forms the foundation of Java's semantic model, OOP in Ada is largely orthogonal to the rest of the language. In Java it is difficult to avoid using OOP; in Ada OOP is brought in only when explicitly indicated in the program. Java is a "pure" OO language in the style of Smalltalk, with implicit pointers and implementation-provided garbage collection. Ada is a methodology-neutral OO language in the manner of C++, with explicit pointers and program-specified storage reclamation. Java uses OOP to capture the functionality of exception handling, multi-threading, enumeration types, and other facilities that are not necessarily related to object orientation. Ada supplies specific features for such functionality, independent of its OO model. Java is oriented towards manipulating dynamic data structures. Ada offers more opportunities for optimization and run-time efficiency, and greater flexibility in the choice of programming styles.