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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed-00.mathworks.com!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada202X: Easy to use "UML private"-like components Date: Sun, 23 Jun 2013 19:38:47 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <69246de0-4b33-4d47-b5be-a45e8c911fb0@googlegroups.com> <9qrbs8l828t3pvgves504a8fm7o1c7tcpj@4ax.com> <91qcs81k6am9l3u3n19lj0b072lc48td69@4ax.com> <1im71djlxwm94$.fbjv1si7kmvj$.dlg@40tude.net> <206y6i0kct3w$.mhlovb1s5pey.dlg@40tude.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1372030728 19462 192.74.137.71 (23 Jun 2013 23:38:48 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 23 Jun 2013 23:38:48 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:u5LECrG1LxIoie64EjvvEmnm0Wo= Xref: news.eternal-september.org comp.lang.ada:15914 Date: 2013-06-23T19:38:47-04:00 List-Id: "Dmitry A. Kazakov" writes: > On Sun, 23 Jun 2013 11:15:15 -0400, Robert A Duff wrote: > >> "Dmitry A. Kazakov" writes: >> >>> ... or there should be no generics. >>> >>> The kludge here rather is generics and inlining, both basically are macro >>> expansions. >> >> Semantics defined by macro-expansion is confusing, and should be >> avoided. I'd prefer to have generic types rather than generic >> packages, and don't use macro-expansion semantics. > > Still macro expansion it is (if meant as textual substitution). No, as I said above, "don't use macro-expansion semantics"! One can have "Sequence of Integer" and "Sequence of Whatever" without any macro-expansion/textual-substitution semantics. And with full type safety (can't pluck a Mumble out of a "Sequence of Integer"). > It is no matter how you reinterpret the expanded text: as a package, as a > type, as a statement, identifier, declaration etc. Generic types would be > no better than generic packages. There should be no "expanded text" in my view. Maybe that's what you mean when you say "no generics", but then you should say "no Ada-style generics" (or C++-style templates). - Bob