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!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool4.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: <87k4kz3mda.fsf@mid.deneb.enyo.de> <5jjgrklivesk$.z0is5qe7mgbt.dlg@40tude.net> Date: Mon, 1 Nov 2010 10:32:13 +0100 Message-ID: NNTP-Posting-Date: 01 Nov 2010 10:32:13 CET NNTP-Posting-Host: 859a5194.newsspool4.arcor-online.net X-Trace: DXC=6gN@4;O9V7A78PK[oJ2ng@4IUK On Sun, 31 Oct 2010 14:46:07 -0700 (PDT), Shark8 wrote: > On Oct 30, 1:37�pm, "Dmitry A. Kazakov" > wrote: >> On Sat, 30 Oct 2010 21:12:36 +0200, Yannick Duch�ne (Hibou57) wrote: >>> This is not more not less safe than any � >>> other composition process. >> >> This requires a proof, which would be hard to provide because generics are >> non-testable. > > Are generics really non-testable? How do you execute a generic body? Testable are generic instances. > The simple example of a bubble-sort on an array is testable: [...] You mean provable. Yes, in some cases it is possible to prove certain properties which would hold for any instance of a generic body. > Working within the realm of generics is somewhat akin to mathematical > induction, you HAVE to use the properties of the objects your working > with and, once you do it "magically" comes together. Right, but what you described is actually generic programming. Generic programming = programming in terms of sets of types, rather than in terms of individual types. I am not against it, I am against generic programming done with generics, because done with classes (class is a set of types) it is much safer and cleaner. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de