From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,56131a5c3acc678e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-25 13:56:37 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Question about OO programming in Ada Date: 25 Nov 2003 16:48:58 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: shevek.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1069797210 28117 128.183.235.101 (25 Nov 2003 21:53:30 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 25 Nov 2003 21:53:30 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:2943 Date: 2003-11-25T21:53:30+00:00 List-Id: "Ekkehard Morgenstern" writes: > Hi guys, > > I have a question about object-oriented programming in Ada: > > Do I have to use class-wide types for object-oriented programming, or could > I use regular access types? Hmm. This very much depends on exactly what you mean by "object-oriented". If you mean getting run-time dynamic dispatching, then somewhere in your system you need a class-wide type (not everywhere). You also need derived types with primitive operations. If these terms don't make sense, please read an Ada book, such as "Ada as a Second Language" by Norm Cohen; that will teach you what you need to know much more quickly than asking here. Or, try to explain here what you mean by "object-oriented". Use either C++ or Ada terms, but try to be very explicit. Then we can tell you how to do that correctly in Ada. You have several very basic misunderstandings; reading a good Ada book would probably be a good idea. -- -- Stephe