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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:5c01:: with SMTP id q1-v6mr3644997jab.31.1532717543316; Fri, 27 Jul 2018 11:52:23 -0700 (PDT) X-Received: by 2002:aca:c744:: with SMTP id x65-v6mr157733oif.2.1532717543152; Fri, 27 Jul 2018 11:52:23 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!85.12.16.70.MISMATCH!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!d7-v6no2033714itj.0!news-out.google.com!k71-v6ni2238itk.0!nntp.google.com!g2-v6no2048990itf.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 27 Jul 2018 11:52:22 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.195.62; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.195.62 References: <72ccb7fa-a9cb-42e6-8c29-3c06da281a45@googlegroups.com> <2212eb54-cb4a-446f-9cdf-287ef220e2c2@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1b5a58b2-65b7-4df8-80b5-03e208d249e1@googlegroups.com> Subject: Re: Ada Distilled by Richard Riehle From: "Dan'l Miller" Injection-Date: Fri, 27 Jul 2018 18:52:23 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 4757 X-Received-Body-CRC: 3357433292 Xref: reader02.eternal-september.org comp.lang.ada:53982 Date: 2018-07-27T11:52:22-07:00 List-Id: On Friday, July 27, 2018 at 12:11:31 PM UTC-5, Shark8 wrote: > On Friday, July 27, 2018 at 8:30:36 AM UTC-6, rabbi...@gmail.com wrote: > > > That's what I think; but there's also a surprising amount of it that'= s about sets, too. > >=20 > > In what way? Off hand I can't see where I've used that at all. >=20 > The most obvious one is the TYPE / SUBTYPE relationship: > TYPE: A set of values, and a set of operations on those values. > SUBTYPE: A TYPE with an additional set of restrictions constraining the v= alues. >=20 > Another was the CASE statement and its required coverage. >=20 > A third [IIRC; this may have been my own realization] had to do with visi= bility being treated as a set [of > sets]: if a name exists uniquely, then that is legal; if there is no exis= tence at all, it's a case of either > mistaking the name or forgetting to WITH the dependency; if there are mul= tiple existences then the > compiler must error-out and demand a qualified name, renaming, or other s= uch resolution. {Extendible to > overloading; which is a set of names distinguished usually by parameter- = or return-types.} >=20 > >=20 > > > Would you happen to recall what Richard said that so convinced you ab= out it? > >=20 > > I don't recall his exact words. To me the fact that I can uniquely tail= or each type to the real world. Yes, implicitly those are sets (and sets of sets), especially to complier w= riters, but in Ada today =E2=80=A2=E2=80=A2how is that different=E2=80=A2= =E2=80=A2 than, say, C++ or OCaml or Rust or any other language that purpor= ts itself to be strongly-typed, especially to the app-domain programmer or = library programmer. Conversely, if Ada'Succ or Ada++ or AdaNG or hypoAda/A= da/hyperAda (or whatever its name would be) would embrace overt set operati= ons* over the sets of types, subtypes, class-trees, and so forth at either = compile-time or run-time or both, now that might lead to an interesting des= tination of super-dooper Ada++ doing something special & useful that no** o= ther language can do, including current Ada. A smidgeon in this direction historically, Z.200 CHILL as Ada's almost-unre= adable Steelman-esque alter ego had set & power-set as 1st-class citizens a= long with array and had grant/revoke*** operations on sets of types as some= thing set-semantically richer than Ada's mere public and private. * e.g., element of, set-difference, union/conjunction, intersection/disjun= ction, not/converse, power-set ** or that only metatemplate programming in C++'s accidentally Turing-compl= ete template engine =E2=80=9Ccan=E2=80=9D conceivably do contortedly, obliq= uely, and via only write-once< illegible< verbose< excessively< subtle< syn= tax< utilizing< deeply-nested< tree< of< special-case< specializations > > = > > > > > > > > >. (Btw, C++ MTP never reads as lucidly as that tongue-in-= cheek example.) *** not that that was necessarily a good thing per se, just a strawman/star= ting-point demonstration of what is conceivable with compile-time set opera= tions on types, subtypes, class-trees, etc.