TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Tucker Taft <[log in to unmask]>
Reply To:
Tucker Taft <[log in to unmask]>
Date:
Thu, 1 Oct 1998 15:50:01 -0400
Content-Type:
text/plain
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.

-Tuck

ATOM RSS1 RSS2