comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada 95 OOP questions
@ 1996-08-14  0:00 W. Wesley Groleau (Wes)
  1996-08-17  0:00 ` Robert Dewar
  0 siblings, 1 reply; 2+ messages in thread
From: W. Wesley Groleau (Wes) @ 1996-08-14  0:00 UTC (permalink / raw)



I offer a compromise to anyone who wants Ada to be more obvious about
the relationship between an object/class/type and its methods/operations.

If you get a warm fuzzy from

    class Person
    {
       Eat();
       Walk();
       Talk();
    }

perhaps you would feel good about

    protected Person is
       entry     Eat;
       procedure Walk ( To    : in Location );
       function  Talk ( About : Subject ) return Words;
    private
       Name : Name_Type;
    end Person;

And you can even put persons in arrays, record fields, or linked lists.
You can pass them as parameters, and each Person knows his/her name without
having to call it "my.Name"

---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Hughes Defense Communications (MS 10-40)                 Home: 219-471-7206
Fort Wayne,  IN   46808                  (Unix): wwgrol@pseserv3.fw.hac.com
---------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-08-17  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-14  0:00 Ada 95 OOP questions W. Wesley Groleau (Wes)
1996-08-17  0:00 ` Robert Dewar

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