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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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!postnews.google.com!x42g2000yqx.googlegroups.com!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: Do people who use Ada also use ocaml or F#? Date: Fri, 29 Oct 2010 19:07:21 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9fc903a1-3fdc-4a85-bb17-2d30c4c54359@x42g2000yqx.googlegroups.com> References: NNTP-Posting-Host: 173.48.246.55 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1288404441 9179 127.0.0.1 (30 Oct 2010 02:07:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 30 Oct 2010 02:07:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x42g2000yqx.googlegroups.com; posting-host=173.48.246.55; posting-account=XRGbKgoAAACag8f1Ww4XGf81DDZtyfbX User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.41 Safari/534.7,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14953 Date: 2010-10-29T19:07:21-07:00 List-Id: On Oct 29, 3:53=A0am, "Dmitry A. Kazakov" wrote: > On Thu, 28 Oct 2010 19:27:40 -0700 (PDT), Chad =A0R. Meiners wrote: > > > I have chosen > > languages that support generics because quite frankly after learning > > Ada, any statically typed language that does not support generics is > > not a suitable language for developing anything of substance. > > I don't see any connection between static typing and parametric > polymorphism (AKA generics), except that both are static. > > In any case I would like to see Ada without generics, which cause a messy > design, are fundamentally non-testable and unmaintainable. > > -- > Regards, > Dmitry A. Kazakovhttp://www.dmitry-kazakov.de I suspect that generics are subject to false expectations. Testing should be done at instantiation. You deceiving yourself when you think that writing generic code that is correct for any instantiation is easy. Instantiation is the other half of the deal with generics, and with C++ and Ada it is in some way too easy. vector foo; and package int_list is new list(Integer); Create the illusion that instantiation is also automatic. However, the thought into whether or not the instantiation is correct is often ignored. In my opinion, the way that ML based language make all function generic by default leads to the programming reasoning about the correction of instantiation because the language eliminates the verbiage above. Type parameterization are a good feature of type systems. Perhaps the main problem is the lack of formal contracts for generic parameters?