Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007
Discussion 1 - Vishal Patel
"A Comparison of the Object-Oriented Features of Ada 95 and Java" by Benjamin Brosgol
In this article, Benjamin Brosgol compares Ada 95 and Java. Ada and Java, like most OO Languages, offer similar support for OO, however they have different approaches. Both of these languages allows for class inheritance, hierarcheis, encapsulation, polymorphism and dynamic binding. There are plenty of differences in the two languages as well, some of which include identifiers, packages, strings. These minor differences aside, they differ in three major ways: the class construct, pointers, and garbage collection.
In Java the class has two purposes a method and a data type. Ada, however, has what is called a package and the tagged type which serves as the two purposes of the class construct. Java, for security reasons, doesn't have explicit pointer functionality instead it uses references. Ada being the stack-based language has explicit pointers. There is automatic garbage collection in both of these languages, however in Ada you have to tell it to do automatic garbage collection. Finally, those minor differences I spoke of earlier; unlike Java, Ada's identifiers are not case sensitive, packages in Ada are semantic constructs, and strings in Ada is a sequence of 8-bit character values, in Java it is a reference to an allocated sequence of 16-bit char values. These are just some of the differences mentioned by Brosgol.
Because Java treats object orientation as its main goal, it gives programmers a good deal of advantages, "consistent integration of features, safe automatic storage reclamation, dynamic flexibilty in data structures"(Brosgol 17). Not to say it doesn't have its drawbacks; "run-time overhead due to implicit heap usage and management, absence of several fundamental data structuring facilities, occasional awkwardness in applying an 00 style to a problem whose essence is process- or function-related"(Brosgol 17). Ada on the other hand treats object orientation as one method not the only option like Java. Some advantages programmers may take advantage of include "run-time efficiency - a program only incurs heap management costs if it explicitly uses language features involving dynamic allocation - design method neutrality, and standardization." Again the flaws are "the need for explicit access types in Ada introduces notational overhead compared with Java, and if the implementation does not provide garbage collection then an Ada developer will need to employ controlled types or an equivalent mechanism to avoid storage leaks"
Links to this Page
- Fall 2005 Discussion 1 last edited on 21 October 2005 at 9:47 am by penguin.cc.gatech.edu
- Vishal Patel last edited on 9 December 2005 at 12:24 am by legolas.cc.gatech.edu