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,FREEMAIL_FROM autolearn=ham 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,UTF8 Path: g2news2.google.com!news4.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Do people who use Ada also use ocaml or F#? Date: Sat, 30 Oct 2010 23:53:13 +0200 Organization: Ada @ Home Message-ID: References: <87k4kz3mda.fsf@mid.deneb.enyo.de> <5jjgrklivesk$.z0is5qe7mgbt.dlg@40tude.net> <1tglk5y57g2ci.cy0cliuo1l3d$.dlg@40tude.net> NNTP-Posting-Host: gHYtk+mhCrTAX6LNXybaBQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.63 (Win32) Xref: g2news2.google.com comp.lang.ada:15964 Date: 2010-10-30T23:53:13+02:00 List-Id: Le Sat, 30 Oct 2010 22:54:39 +0200, Dmitry A. Kazakov = a =C3=A9crit: >> Why should generic >> usage be provable before instantiation ? > > Because you want to be able to deliver generic components. What would be your requirements to state you are able to deliver a libra= ry = ? (I mean a library, as a library, not linked to an application). Aren't generics similar to libraries ? If you are to deliver an application designed upon generics, then it can= = be proved or unproved with that design. If you are to deliver a generic as standalone, then there are things you= = will never be able to prove, right, but just like you will not be able t= o = prove anything for a standalone library you've delivered. I would expect= = the requirements for the library should include suitability for one or = some usages, precisely and priorly defined. This requirement for a = standalone library, could be =E2=80=9Cit must be able of this and that=E2= =80=9D. The = requirement for a standalone generic, in a similar way, could be =E2=80=9C= it must = be able of this and that with these or these instantiation parameters=E2= =80=9D : = just add a requirement on parameters. Impossible to guarantee anything = outside of any defined scope, for whatever design. With generic, = instantiation parameters matters, so just add this to the requirements. Let's formalize a bit the deal. Two distinct views of a generic from a client's point of view : 1) Instance of a generic in an application 2) Generic as standalone (as a library) Then for the requirements : 1) If the generic appears in an application, then the checks and requirements for the whole application applies. 2) If the generic is standalone, then the kind of requirements which come with any library applies, plus, the added requirement that these latter requirements are at least verified for one or some clearly specified instantiation parameters. What about such a deal ? -- = Si les chats miaulent et font autant de vocalises bizarres, c=E2=80=99es= t pas pour = les chiens.