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:
Reply To:
Date:
Fri, 13 Nov 1998 10:26:15 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (64 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.

Why is that? in Java I can have many classes in the same package. Why
would not one been able to do the same with Ada? as in

package bank_accounts
  class account begin
        money_type amount;
        function   money_type withdraw;
  end class account;

  class saving_account is new accounts
        etc..
  end class saving_account;
end package bank_accounts;

(the above is not legal Ada :)

>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. :-)
>

I agree that in Java, people are still not getting used to thinking in terms
of "packages", but only in terms of "classes". Just like in C++, people are
still not used to factor out/design the systems in terms of a collection
of different named spaces, but still use the class as the basic design
component.

In Ada, the Package plays the main role, and the tagged types a
secondary role sort-of.

I find in Java, a package is used just to throw into it a bunch of
classes. the package in java does not come in at a design level, but
only as a class organization level. i.e. one application is thrown in one
package with many classes.

the fact that in java classes within a package can see each others (except
for the private parts of each class) does not seem like a major point,
becuase I as said, the whole java application is put into on package any
way.

offcourse for a very large java application thinks might be different, but
I have not seen a very large Java application, and it will be interesting to
see how Java scales up in terms of using it for large applications, something
Ada is known for ( millions of lines of code). I think it will be very
interesting to see that.


on a side point about no class construct in Ada: I feel it was a mistake
not to add it in. I understand that the semantics of a class in there, but
not the construct itself. but that makes Ada OO stuff not normal. it is
like going to England, and having to drive of the left side of the road, while
the rest of the world drives on the right side of the road. People will find
driving on the left awkward and do not feel right and they will make mistakes,
but offcourse the Britich will think that driving on the left is the normal
way, and the rest of the world got it wrong.

just my 1.5 cents this morning...

Nasser

ATOM RSS1 RSS2