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!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: Ada Successor Language Date: Tue, 19 Jun 2018 13:30:43 -0700 Organization: A noiseless patient Spider Message-ID: <87fu1izfgs.fsf@nightsong.com> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="d6cb8fb4b722703e60151f6acfa9b2a5"; logging-data="26834"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CVRvu5/Qy2VIp8dpt0KzK" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:DlfDkDZxz4svIZOSdrRTUaFMFyA= sha1:Dta9byFo2m3+GIsv3Y/q+1o8nTw= Xref: reader02.eternal-september.org comp.lang.ada:53169 Date: 2018-06-19T13:30:43-07:00 List-Id: "Dmitry A. Kazakov" writes: > Generics and macros are same thing regardless implementation. That makes no sense under the notion of generics in that paper whose url I posted. C++ does them with a macro-like scheme that can get messy but Haskell does them in a much sounder way that works really well and doesn't involve macros. > You can have shared generic bodies as in Janus Ada, but that changes > nothing on the nature of generics. It was a mistake for both Ada and > C++ to have them in the first place. I don't understand what the issue is. I don't think it was a mistake for C++ to have generics since the generic approach in C++ is IME much better than the OO approach with inheritance. But, I could agree that C++'s use of templates to implement generics causes some problems. I use them but encounter the obvious annoyances in doing so. "Dan'l Miller" writes: > I think Dmitry is saying that the Ada's _LRM_ standard doesn't require > that better way. GNAT's generics are closer to C++'s macro-esque > approach, AIUI. Conversely, Janus Ada's generics are at the other end > of the spectrum, perhaps an exemplar model of "the better way" desired > state. Oh hmm, ok, that's interesting. But I'm surprised that the LRM is loose enough to allow two observably different implementations like that.