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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8603e726bcf960f5,start X-Google-Attributes: gid103376,public From: Graham Hughes Subject: Ada OO Date: 1996/11/25 Message-ID: <57aq7s$30j@yuggoth.ucsb.edu>#1/1 X-Deja-AN: 198492834 organization: University of California, Santa Barbara newsgroups: comp.lang.ada Date: 1996-11-25T00:00:00+00:00 List-Id: -----BEGIN PGP SIGNED MESSAGE----- I apologize if this has been glossed over before, but I didn't notice anything immediately through the back articles. The tutorials at http://www.adahome.org/ seem to gloss over the way Ada OO is handled; possibly this is because they believe it to be so simple that their explanation suffices. However, I'm coming from C++, where OO is quite complicated, and I'm not sure I've quite got a handle on it yet. - From what I've seen, Ada OO is very similar to CLOS; both use the Object_Method(Object, Args); syntax instead of the C++-style Object.Object_Method(Args); where Object is a tagged record. Given this, how are C++-style virtual methods defined? The stuff I've looked at implied that all subprograms defined in the package spec are virtual, and pure virtual methods are achieved by (appending? prepending?) abstract to the definition. With CLOS, all defmethod (or is it defgeneric? been a while) methods are effectively virtual, and pure virtual methods are just a defgeneric (?) with no body definitions. Is this the way Ada OO works? Finally, re: the abstract; is it needed in the package body, or can it be ommitted? Thanks for any help. - -- Graham Hughes (graham.hughes@resnet.ucsb.edu) alt.PGPlike-key."graham@A-abe.resnet.ucsb.edu".finger.look.examine alt.homelike-page."http://A-abe.resnet.ucsb.edu/~graham/".search.browse.view alt.silliness."http://www.astro.su.se/~robert/aanvvv.html".look.go.laugh -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBMpjr6iqNPSINiVE5AQFw3AP/UMeHylSkz0Y++9uvJsbPSbTwmQH4Y3vF eN5AiLyTLtXFyk4TQqs7cVjhhd8yDfv1mhtU5eWA/NIAcHEhbcdggz4qr8/6j1zR ZcAE65nRY9s6dbsPXRYzZJiZYkbEygS3SaHuZxm1NAfrOoSE1zsgTlf6cAsmsfAC agpg1XlnA58= =d/vL -----END PGP SIGNATURE-----