TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced 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:
Fri, 17 Jul 1998 09:36:07 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (16 lines)
> However, Ada has the disadvantage of not having synchronized methods.
> ...

Ada's protected subprograms are essentially identical to synchronized methods.
However, protected subprograms come with the added safety that a
protected object is fully encapsulated by protected subprograms,
whereas in Java there is nothing precluding someone from adding an
unsynchronized method by mistake and thereby destroying the nicely
synchronized access.

Note that in the Ada to Java compilers, Ada's protected subprograms
are implemented using synchronized methods, because they have
such nearly identical semantics.

-Tuck

ATOM RSS1 RSS2