TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

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

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

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