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-Thread: 103376,7a3b1c6915ea1273 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.196.130 with SMTP id im2mr2202657pbc.3.1326500778958; Fri, 13 Jan 2012 16:26:18 -0800 (PST) MIME-Version: 1.0 Path: lh20ni179229pbb.0!nntp.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!62.179.104.142.MISMATCH!amsnews11.chello.com!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How many Ada compiler bugs are here? Date: Fri, 13 Jan 2012 18:26:13 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <01dd6341-9c3c-4dcb-90f8-6ac66c65eb66@z1g2000vbx.googlegroups.com> <98adc34c-deed-4190-9e10-755cb886984f@n39g2000yqh.googlegroups.com> <5cm1d9xlavps$.1tjtc88r9ze21$.dlg@40tude.net> <6d352870-d204-4137-a562-5a0b67db1f80@h13g2000vbn.googlegroups.com> <15d37z3l8zllg$.3z2pj9cy5kvq.dlg@40tude.net> <7610c0ee-db98-4530-afab-f29e187ee7d0@h3g2000yqe.googlegroups.com> <1swdtf9umcv6h.1abrhg4hr4tdd$.dlg@40tude.net> <189376d3-eab5-44a2-a7fc-8a227d1f6d70@k10g2000yqk.googlegroups.com> <11extopcf5hsy.qk7psu30kjrp.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1326500776 27311 69.95.181.76 (14 Jan 2012 00:26:16 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 14 Jan 2012 00:26:16 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-01-13T18:26:13-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:11extopcf5hsy.qk7psu30kjrp.dlg@40tude.net... >>> BTW, I always wondered why cannot we have multiple parents of a package >>> in >>> Ada? >> >> Sounds hugely complicated. > > Why? The only complicated thing would naming of the files. Because the parent's declarations are directly visible in the child. If there are multiple parents, you'd have multiple scopes of declarations directly visible, and we would have to worry about what happens when there are conflicts. We don't have to do this in Ada today. There is a similar problem for package use clauses, but there is no satisfactory solution to that problem. All of the solutions are dangerous (Ada picks the least dangerous solution, but it still has lots of issues in practice). I don't think we want more of these cases. In fact, the only *safe* alternative is for there to be precisely one scope that is directly visible. This isn't very practical, I'm afraid, and I don't know of any way to support that for children. [Aside: I'm now convinced that the primary problem with use clauses is conflicts between non-overloadable entities. As such, "use type" and "use all type" are much safer (since they only make overloadable entities visible), and I will be using them more often in new code. I'm still going to avoid package use in the vast majority of cases.] I realize that allowing only one of something is always going to be a problem: one parent, one stream attribute of each kind, etc. But many of these defy easy solution. Randy.