TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
From: Tucker Taft <[log in to unmask]>
Date: Thu, 1 Oct 1998 15:50:01 -0400
Reply-To: Tucker Taft <[log in to unmask]>
Parts/Attachments: text/plain (28 lines)
Just to wade into this one for fun...

Java doesn't have very good support for "value"-oriented abstractions
like complex numbers, strings, RGB-colors, etc, corresponding
to what would be a *non*-limited private type in Ada.

It only has good support for "object"-oriented abstractions, which would
correspond to *limited* private types in Ada.

Smalltalk is like Java in this sense.

Note that Ada 83 had relatively weak support for "value"-oriented
abstractions, because it lacked user-defined assignment, finalization,
equality, and streaming.

With Ada 95's "controlled" and "stream" stuff, plus the ability
to define user-defined equality more generally, Ada's support for
value-oriented abstractions is now very good.

The closest Java comes to a "value" type is the notion of
a "clonable" object, plus user-defined serialization,
but "clone" must always be called explicitly, and there
is no automatic composition of operations when composite
objects are used, the way you get in Ada 95 for finalization,
assignment, and equality.