comp.lang.ada
 help / color / mirror / Atom feed
From: cosc19z5@Bayou.UH.EDU (Spasmo)
Subject: Ada95 OOP Questions
Date: 1996/07/28
Date: 1996-07-28T00:00:00+00:00	[thread overview]
Message-ID: <4tf3l4$4hu@masala.cc.uh.edu> (raw)


Hi.

	First off thanks for all the help I've gotten here already.
I'm currently cranking out some code to get familiarized with Ada
and it's going wonderfully.  Now with that in mind what I have
to ask is a bit long winded and maybe a bit vague, but I'll try
to put it as best as I can.

Ok, with regards to OOP, my previous experience has been with
C++.  In that language when you declare a class, it consists of
data (which can be at various visibility levels (ie: private)),
and methods which operate on the data in the class.  What this
results in is an object (loose use) that has its own actions
and its own attributes so that it's a self contained entity
so to speak.  For instance here's a crude idea:

	class Person {
		public:
			void Walk();
			void Talk();
			void Eat();
		private:
			int Age;
			char Name[256];
	};

When an instance of Person is declared, you just make calls
to the functions provided in that class and all the data
associated with Person is kept inside it and manipulated in it.
You can of course inherit, use polymorphism, etc...

Well after looking at Barnes' Ada95 book and checking out the
OOP sections I noticed that the Objects in Ada95 seem to
consist purely of data, and no methods seem to be involved
so that you have to pass these objects to functions in order
to get stuff done.  Am I wrong in this (or did I somehow 
miss something again?).

In any case I've been looking at using private Objects inside
packages and using these objects as package-global variables
to all the procedures/functions involved so that one can
simulate this sort of behavior, although the simulation
isn't perfect.  Well my other question has to do with
whether or not I should do this?  I mean I have a decent
grasp of using Ada for programming, but am I truly programming
in Ada?  Am I trying to program in C++, but I just happen to
be using Ada to do it?  What is the consensus on this, and
also would anyone describe the philosophy behind this
implementation of OOP?

I'm being careful because I also was confused as to tasks not
seeming to employ time-slices in my implementation only to
realize that it was a blessing in disguise, so I'm approaching
this OO implementation in the same way, namely that there
is something inherent that I am not getting that makes this
a very good thing.

Thanks and I hope my question was somewhat understandable.


--
Spasmo
"Everyone has secrets, but sometimes you get caught,
 So if it's just between us, my silence can be bought"
	"Blackmail" by Sloppy Seconds





             reply	other threads:[~1996-07-28  0:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-28  0:00 Spasmo [this message]
1996-07-28  0:00 ` Ada95 OOP Questions David C. Hoos, Sr.
1996-07-28  0:00   ` Spasmo
1996-07-28  0:00 ` Andre Spiegel
1996-07-28  0:00   ` Spasmo
1996-07-29  0:00     ` Thomas Kendelbacher
1996-07-31  0:00       ` Spasmo
1996-08-01  0:00         ` Thomas Kendelbacher
1996-08-02  0:00         ` Gene Ouye
1996-08-01  0:00       ` Jon S Anthony
1996-07-30  0:00     ` Ken Garlington
1996-08-04  0:00       ` Spasmo
1996-07-30  0:00     ` David Wheeler
1996-07-31  0:00       ` Spasmo
1996-07-29  0:00 ` Andre Spiegel
1996-07-29  0:00   ` David Wheeler
1996-07-30  0:00     ` Spasmo
1996-07-30  0:00     ` Spasmo
1996-07-29  0:00   ` Thomas Kendelbacher
1996-08-02  0:00     ` Robert Dewar
1996-08-05  0:00       ` Thomas Kendelbacher
1996-08-06  0:00         ` Robert I. Eachus
1996-08-06  0:00         ` Robert Dewar
1996-08-06  0:00           ` Thomas Kendelbacher
1996-08-06  0:00             ` Robert A Duff
1996-08-07  0:00               ` Robert Dewar
1996-08-08  0:00                 ` Robert A Duff
1996-08-09  0:00                   ` Robert Dewar
1996-08-12  0:00             ` Robert I. Eachus
1996-08-08  0:00           ` Theodore E. Dennison
1996-08-09  0:00             ` Robert Dewar
1996-08-12  0:00             ` Joel VanLaven
1996-08-10  0:00         ` Chris Morgan
1996-07-30  0:00 ` Andre Spiegel
1996-07-30  0:00 ` Robert I. Eachus
1996-07-30  0:00 ` Andre Spiegel
1996-08-01  0:00 ` Jon S Anthony
1996-08-13  0:00 ` Eric C. Newton
1996-08-14  0:00 ` Eric C. Newton
1996-08-14  0:00 ` Ken Garlington
1996-08-14  0:00 ` Jon S Anthony
1996-08-21  0:00 ` Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-08-08  0:00 W. Wesley Groleau (Wes)
1996-08-20  0:00 Farshad Nayeri
1996-08-20  0:00 Farshad Nayeri
1996-08-21  0:00 ` Jon S Anthony
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox