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:a6b:8816:: with SMTP id k22-v6mr7393867iod.129.1529442476024; Tue, 19 Jun 2018 14:07:56 -0700 (PDT) X-Received: by 2002:aca:abc6:: with SMTP id u189-v6mr797351oie.2.1529442475937; Tue, 19 Jun 2018 14:07:55 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.68.MISMATCH!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!u78-v6no434551itb.0!news-out.google.com!c20-v6ni183itc.0!nntp.google.com!d7-v6no426227itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 19 Jun 2018 14:07:55 -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: <5e86db65-84b9-4b5b-9aea-427a658b5ae7@googlegroups.com> <878t7u1cfm.fsf@nightsong.com> <776f3645-ed0c-4118-9b4d-21660e3bba4b@googlegroups.com> <87602fbu2g.fsf@nightsong.com> <87po0mziqt.fsf@nightsong.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <30e271d8-0ef9-4986-8726-2b09c7fb9526@googlegroups.com> Subject: Re: Ada Successor Language From: "Dan'l Miller" Injection-Date: Tue, 19 Jun 2018 21:07:56 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 3776 X-Received-Body-CRC: 4069530049 Xref: reader02.eternal-september.org comp.lang.ada:53172 Date: 2018-06-19T14:07:55-07:00 List-Id: On Tuesday, June 19, 2018 at 2:39:30 PM UTC-5, Dmitry A. Kazakov wrote: > On 2018-06-19 21:19, Paul Rubin wrote: > > "Dmitry A. Kazakov" writes: > >> There are 50 shades of mess. Ada's generics try to introduce some > >> weakly-typed contracts on the formal generic parameters, where C++ > >> templates go completely untyped, but mess is always mess. You cannot > >> make a decent language out of macro processor. > >=20 > > I don't understand what you're getting at. Are Ada generics implemente= d > > with a macro processor? C++ templates amount to that, but there are > > other, better ways to implement generics. >=20 > Generics and macros are same thing regardless implementation. The core=20 > idea and all power lies in textual substitution as opposed to the=20 > concept substitutability in a properly typed systems. Clearly, Ada's generics are not performing textual substitution. Ada's gen= erics are performing constraint-matching on subtypes passed as formal argum= ents. If the criteria of the constraints are satisfied, the previously-dec= lared-long-ago subtype in the AST is what is passed in as the formal argume= nt of an Ada generic. Dmitry, instead of the pox-on-all-their-houses approach to wholesale malign= ing of generics (as a troller fisherman would do to foment needless more-he= at-than-light argument), what would the better world desired-state look lik= e without generics (as a true luminary would do to positively contribute in= sightful expertise)? I hope that you don't say for 25 would-be passings of different subtypes in= as the formal argument of a single would-be generic package's type paramet= er that a human being should manually author the same or nearly the same di= fferently-named packages 25 times (and get carpal-tunnel syndrome). I am h= oping that you have some brilliant genius insight regarding: 1) multi-stage programming and source-code generation therewith, or 2) highly-expressive compile-time type-manipulation language, or 3) something like that.