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,76ec5d55630beb71 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-02 14:05:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail Message-ID: <3EDBBC18.6080103@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada 200X References: <3EDAD07A.3010200@attbi.com> <3EDB5DBE.4070807@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1054587957 24.62.164.137 (Mon, 02 Jun 2003 21:05:57 GMT) NNTP-Posting-Date: Mon, 02 Jun 2003 21:05:57 GMT Organization: AT&T Broadband Date: Mon, 02 Jun 2003 21:05:57 GMT Xref: archiver1.google.com comp.lang.ada:38401 Date: 2003-06-02T21:05:57+00:00 List-Id: Vinzent Hoefler wrote: > Because the view conversion to a grandparent is of course allowed, > this is little tricky if not to say error prone sometime. > > Well, yes, I know, you should always design your object hierarchy > beforehand. ;-) In one sense this is a valid criticism of the "Ada way" of doing things. In another it is totally bogus. Ada tagged type derivation trees tend to come in two flavors. The first is one parent with a lot of children. (A bush.) The class rooted at Controlled is like this. The other common type of Ada derivation tree is a pole. You have a sequence of generic instantiations in the private part of a package declaration, each instantiation creating a new mixin. In the body of the package you have lots of view conversions. But the view conversions are definitely not to parents or grandparents, they are to specific mixins. Any added mixins should not change any of the current uplevel references. So I have done lots of changes to type hierarchies in Ada, and I don't think I have ever needed to change a view conversion unless I have done the gun, foot, shoot, optimization. (If you really, really need to change the name of an instantatiation, you have to be ready to do a global search and replace against the body and all child packages. The problem is if you used a name originally that matches some component name or the like...)