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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.103.2 with SMTP id b2mr303966ywc.40.1473767172197; Tue, 13 Sep 2016 04:46:12 -0700 (PDT) X-Received: by 10.157.6.136 with SMTP id 8mr1124355otx.9.1473767172157; Tue, 13 Sep 2016 04:46:12 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!w41no19202qtw.1!news-out.google.com!b4ni18017iti.0!nntp.google.com!x192no984019itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 13 Sep 2016 04:46:11 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8302:3f70:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8302:3f70:5985:2c17:9409:aa9c References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2837d915-12c8-4c23-8907-1d146d1abae7@googlegroups.com> Subject: Re: Class-wide types algebra From: rieachus@comcast.net Injection-Date: Tue, 13 Sep 2016 11:46:12 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:31770 Date: 2016-09-13T04:46:11-07:00 List-Id: On Monday, September 12, 2016 at 5:39:32 PM UTC-4, Dmitry A. Kazakov wrote: > On 2016-09-12 23:12, rieachus@comcast.net wrote: >=20 > I am not sure what you mean. Ada's "in" has the mathematical meaning=20 > "member of" (=E2=88=88). If you meant "subset of"/"subsumption" (=E2=8A= =86) then it is=20 > just same as >=20 > T in R'Class I was using "in" as syntactic sugar, extending R'Class without creating a n= ew (named) subclass. As unrelated to the Boolean version as to its use in = subprogram declarations. > > Why the second case? The real issue seems to be visibility. You have > > an interface, and a type which could/should be a member, but the > > declaration is more deeply nested. (There would still need to be some > > magic so that the lifetime of T'Class is the same as R'Class. Or better= , > > just a rule that requires them to have the same lifetime from other rul= es.) >=20 > I don't see any problems with that. All types in question are statically= =20 > known. Type tests are expressible already >=20 > X in (T'Class and R'Class) <=3D> (X in T'Class) and (X in R'Class) >=20 > The real problem is declarations not tests. IMHO the biggest problem in Ada is the namespace pollution of types. Dotte= d notation is acceptable when package names hide each other, but I hate hav= ing to write "subtype Foo is Bar.Foo." Subprograms can be overloaded, but = adding a (new) type name during maintenance can break something down a chai= n of derivations. A long time ago, Lori Clarke and others wrote: "Nesting in Ada is for the B= irds." http://dl.acm.org/citation.cfm?id=3D948651 There are a few missing = pieces when you go to mix class wide types into Ada. I've started numberin= g the often never mentioned again types that appear when using interfaces t= o do mix-ins.