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,b0d569080889afd6 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: A question for my personal knowledge. Date: 1999/05/15 Message-ID: #1/1 X-Deja-AN: 478067001 References: <1VEZ2.1515$I51.88140@carnaval.risq.qc.ca> <37372A84.641F2133@bigfoot.com> <7h8oe8$2js$1@cf01.edf.fr> <37382B0C.A95B6745@bigfoot.com> <7h9o21$9v4$1@nnrp1.deja.com> <7h9pei$aut$1@nnrp1.deja.com> <373AC668.4824FF07@decada.enet.dec.com> <7hfctj$1kb4@drn.newsguy.com> <7hfp1n$28tr@drn.newsguy.com> NNTP-Posting-Date: Fri, 14 May 1999 21:48:06 PDT Newsgroups: comp.lang.ada Date: 1999-05-15T00:00:00+00:00 List-Id: Mike writes: > In Ada, you still use function calls and pass tagged records as > parameters. > > in real OO, you invoke methods on objects. You are confusing syntax and semantics. The call Push (X, On => Stack); really does "invoke a method on an object." > Also, a class is more clear representation of an object. in Ada, bolting > OO concepts into a procedural language, makes the way to do OO in Ada > not very natural at all. Ada83 was already a class-based language. All Ada95 was to extend the existing facilities for class-based programming with type extension. In Ada83, you did this: type T is private; In Ada95, you do this: type T is tagged private; In Ada83, you did this: type NT is new T; In Ada95, you do this: type NT is new T with private; What's "bolt-on" about that? Ada95 was designed specifically to NOT add bolt-on features, so your statement to the contrary is incorrect. > The biggest mistake Ada made in 95 was not introduce the class > construct as is common in other OO languages. Who cares if that would > have broken Ada83 programs, you could have called it X95 for all I > care, it did not have to be called Ada. But the class already existed in Ada83: it's called a "private type". type Stack_Type is private; procedure Push (Item : in Item_Type; On : in out Stack_Type); function Get_Top (Stack : Stack_Type) return Item_Type; In Ada95, I might say: type Stack_Type is tagged private; procedure Push (Item : in Item_Type; On : in out Stack_Type); function Get_Top (Stack : Stack_Type) return Item_Type; Not much difference, except that in Ada95 I can extend the stack type: type My_Special_Stack is new Stack_Type with private; > sorry, but OO in Ada is not normal OO. I am happy that you have no problem > with it, but 99% of the rest of the world do not do OO that way Ada does it. You seem not to understand the difference between syntax and semantics.