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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d1df6bc3799debed X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: Syntax for tagged record types and class types Date: 1997/05/23 Message-ID: <33855DE5.970@elca-matrix.ch>#1/1 X-Deja-AN: 243293990 References: <3.0.32.19970423164855.00746db8@mail.4dcomm.com> <5kl9qc$g4d@bcrkh13.bnr.ca> <5kmek2$9re@bcrkh13.bnr.ca> <33727FA5.5C7A@sprintmail.com> <3374C19F.15FE@sprintmail.com> <3376CF85.3E15@sprintmail.com> <33828299.2A3@world.std.com> <33830D58.6D8F@elca-matrix.ch> <3384A4EA.167E@magellan.bgm.link.com> Organization: ELCA Matrix SA Reply-To: Mats.Weber@elca-matrix.ch Newsgroups: comp.lang.ada Date: 1997-05-23T00:00:00+00:00 List-Id: Samuel A. Mize wrote: > I haven't read your thesis, so I can't address any other benefits of this > proposal. However, you can get the prefix notation in Ada 95, by using a > generic package. To make things clear, the main reason why I proposed package types (or subprograms in records) is not for the prefix notation, but for providing object oriented constructs (inheritance, polymorphism, ...). The prefix notation just came naturally with the constructs I proposed, but I am not fanatic about it at all. But I still think that it makes a few things simpler, and more natural to most people, than tagged types. For instance it is very clear that the prefix is used for selecting the subprogram to be called in a dispatching call, whereas tagged types need complicated rules for defining the controlling operand(s) (see for instance RM 3.9.3(16)). There is a more complete comparison of tagged types vs package types in my thesis. > [...] example of class implemented as a generic deleted. Of course you can do it this way, but it's just not workable. Generic instances are not objects and all you can do is declare them in a certain scope, you can't copy them around, you can't declare an array of them, you can't allocate them dynamically, etc.