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,1116ece181be1aea X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-23 03:49:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!newsmi-eu.news.garr.it!NewsITBone-GARR!newsserver.cilea.it!news.crs4.it!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Is the Writing on the Wall for Ada? Date: Tue, 23 Sep 2003 12:49:41 +0200 Organization: CRS4, Center for Adv. Studies, Research and Development in Sardinia Message-ID: <3F702545.6080704@crs4.it> References: <3F5F7FDC.30500@attbi.com> <3F6079A9.6080108@attbi.com> <3F60E380.4020307@attbi.com> <3F694186.5060709@crs4.it> NNTP-Posting-Host: sparre.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: pietro.crs4.it 1064309614 7987 156.148.70.170 (23 Sep 2003 09:33:34 GMT) X-Complaints-To: news@nntpserver.crs4.it. NNTP-Posting-Date: 23 Sep 2003 09:33:34 GMT User-Agent: Any Browser, HTML 4.01, XHTML 1.0 X-Accept-Language: fo, da, no, sv, is, fr, de, it, In-Reply-To: Xref: archiver1.google.com comp.lang.ada:42793 Date: 2003-09-23T09:33:34+00:00 List-Id: Ole-Hjalmar Kristensen wrote: >>>>>>"JSA" == Jacob Sparre Andersen writes: > JSA> Olehjalmar Kristensen wrote: > >>>>>>> "RIE" == Robert I Eachus writes: > JSA> Looks that way to me too. But if a and b had contained data, for > JSA> example position data in respectively spherical and rectangular > JSA> coordinates (to reuse an earlier example), then you would most likely > JSA> end up in trouble. > Depends on what you expect. As you can see, there is no conflict as > such. On the other hand, a and b can not access each others variables > either. That was not really what I was worrying about either. I couldn't even imagine that somebody would design a language that would allow a and b to access each others variables. It was more the problem of inconsistencies due to duplicated data with the same interpretation: type Complex_Polar is private; function Argument (Item : in Complex_Polar) return Scalar; [...] type Complex_Rectangular is private; function Arg (Item : in Complex_Rectangular) return Scalar; [...] private type Complex_Polar is record Modulus, Argument : Scalar; end record; type Complex_Rectangular is record Im, Re : Scalar; end record; If we made a new type inheritede from both of these two (yes, I didn't write that they are tagged), the results of the two functions Argument and Arg (which I at least would want to be the same) would not neccessarily be the same. > In the general case I agree, there may be problems, but I think that > the compiler rejecting cases it cannot resolve properly is quite acceptable. I am not sure that is sufficient for me. But the above case _would_ most likely be resolved properly by the compiler (because I didn't give both the functions the same name) and thus lead to unneeded confusion. I may not understand the reasons behind MI completely, because I can't imagine a good example, where true MI is significantly better (in terms of the design goals for Ada) than interfaces. And then I am also worried that MI might lead to too many maintenance problems equivalent to my example above. Jacob -- "Any, sufficiently advanced, technology is indistinguishable from magic."