TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


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
"W. Wesley Groleau x4923" <[log in to unmask]>
Reply To:
W. Wesley Groleau x4923
Fri, 13 Nov 1998 09:15:19 -0500
text/plain (22 lines)
> .....  But part of my point was that having a "special notation" would
> have eliminated the possibility of defining several classes/tagged types
> in the same package. Because of this--and the 'Class operation you can
> create classes that are closely intertwined.  .....

This merits a quote from the Java/Ada comparison in September.  Can't
comment further--I've still never _seen_ a Java package.  If he's correct
about Java programmers, I'm not likely to see a good one soon. :-)

> The OOP inheritance mechanism is independent of the encapsulation mechanism
> ===========================================================================
> I still think Java has this covered.  Non-public classes and methods I declare
> in a Java package are only visible within the package.  Java programmers don't
> think this way but it _is_ a natural use of Java packages to put two public
> classes in a package along with all kinds of non-public classes.  Nobody
> outside the package would be able to access the non-public classes.  I don't
> think this is a "workaround"; I think it's a significant Java language feature
> intentionally provided to give Java programmers the same capability that is
> available in Ada.  It's just that most Java programmers don't understand the
> _advantages_ of this kind of encapsulation.