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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9e7db243dfa070d7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Do people who use Ada also use ocaml or F#? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <9fc903a1-3fdc-4a85-bb17-2d30c4c54359@x42g2000yqx.googlegroups.com> Date: Sat, 30 Oct 2010 09:49:41 +0200 Message-ID: NNTP-Posting-Date: 30 Oct 2010 09:49:38 CEST NNTP-Posting-Host: e67d9f0e.newsspool3.arcor-online.net X-Trace: DXC=68j3231M8B\aoembcbF;DQMcF=Q^Z^V3X4Fo<]lROoRQ8kFOW4edIN[[6LHn;2LCV^[ On Fri, 29 Oct 2010 19:07:21 -0700 (PDT), Chad R. Meiners wrote: > On Oct 29, 3:53�am, "Dmitry A. Kazakov" > I suspect that generics are subject to false expectations. Certainly. In the context of Ada they were expected to be a decent tool for solid software design, what a pity! (:-)) > Testing should be done at instantiation. Compare: testing of a procedure must be done at each call point. Procedure is a software decomposition vehicle. It, in particular, saves you work of testing each instance of its outputs for a given set of inputs. Parametrically polymorphic body (generics) is supposed to serve same purpose. It fails miserably. > Type parameterization are a good feature of type systems. Absolutely, and Ada has type parameterization in more advanced, controllable, comfortable and safe forms: discriminants and type tags. > Perhaps the > main problem is the lack of formal contracts for generic parameters? Partially yes, but that is a consequence. The real problem is that generics is a meta language. What is the reason in building another language upon the object one? Is it because the object one cannot be fixed? Then why people are so sure they could fix these problems in the meta language? The "Ada proper" language is statically typed with user-defined types etc. The language of Ada formal generic specifications is a half-baked ugly weakly typed language. C++'s templates formal language is not even typed. And to implement this horror was so much efforts that nobody ever cared about user-defined formal generic types! It took decades of hard work to make Ada 95 generics working in GNAT! And this meta language is lightyears distant from the point where the problems of the object language could become noticeable. It is such a mess that we will never arrive there. You cannot implement with generics anything near close in complexity, any layman programmer does at daily basis with the object language. So, what was the reason? Isn't it time for some reflection? BTW, it is too late for generics anyway. Their place was taken by the software tools. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de