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: Fri, 17 Jul 1998 09:36:07 -0400
Reply-To: Tucker Taft <[log in to unmask]>
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.