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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,56131a5c3acc678e,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-25 11:03:57 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stueberl.de!npeer.de.kpn-eurorings.net!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: "Ekkehard Morgenstern" Newsgroups: comp.lang.ada Subject: Question about OO programming in Ada Date: Tue, 25 Nov 2003 20:04:02 +0100 Organization: 1&1 Internet AG Message-ID: NNTP-Posting-Host: p508c004b.dip0.t-ipconnect.de X-Trace: online.de 1069787036 10033 80.140.0.75 (25 Nov 2003 19:03:56 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Tue, 25 Nov 2003 19:03:56 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:2937 Date: 2003-11-25T20:04:02+01:00 List-Id: 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? Like, when I declare a procedure procedure A ( B: in access all T'Class ) could I use a different method and still get all the benefits of Ada object-oriented programming? Like, what about: procedure A ( B: in access all T ) or procedure A ( B: in out T ) or procedure A ( B: in T ) Also, if I use access types, should I create new types or declare them directly in the procedure/function, and what about the 'all' access qualifier, should I create two types of access types (one with 'access' and one with 'access all'), or should I declare them directly in the procedure and decide individually what kind of access I need? I would like to program as cleanly as possible in Ada right from the start, so I'd be glad if someone could give me some hints. :-)