comp.lang.ada
 help / color / mirror / Atom feed
From: "W. Wesley Groleau (Wes)" <wwgrol@PSESERV3.FW.HAC.COM>
Subject: Re: Ada 95 OOP questions
Date: 1996/08/14
Date: 1996-08-14T00:00:00+00:00	[thread overview]
Message-ID: <9608141717.AA08650@most> (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
---------------------------------------------------------------------------




             reply	other threads:[~1996-08-14  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-14  0:00 W. Wesley Groleau (Wes) [this message]
1996-08-17  0:00 ` Ada 95 OOP questions Robert Dewar
replies disabled

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