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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Seeking for papers about tagged types vs access to subprograms Date: Sun, 12 May 2013 10:21:49 +0200 Organization: Ada @ Home Message-ID: References: <1bfhq7jo34xpi.p8n2vq6yjsea.dlg@40tude.net> <12gn9wvv1gwfk.10ikfju4rzmnj.dlg@40tude.net> <1oy5rmprgawqs.1jz36okze0xju$.dlg@40tude.net> <1q2ql1e4rcgko.diszzq1mhaq8$.dlg@40tude.net> <1msoad3apbkf.1optea1ujjydv.dlg@40tude.net> NNTP-Posting-Host: 2WDySVo3ljzMoJ+IkbOqwg.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 User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 X-Original-Bytes: 3745 Xref: number.nntp.dca.giganews.com comp.lang.ada:181600 Date: 2013-05-12T10:21:49+02:00 List-Id: Le Sun, 12 May 2013 09:14:41 +0200, Dmitry A. Kazakov = a =C3=A9crit: > To put it simply: if a type is designed in a way that limits it use, i= t = > is > a poor design. The sense or meaning, both in natural and formal languages, comes from = restricting possible interpretations. > You are conflating the > semantics of a type with the semantics of *a* program that uses this t= ype > somewhere, somehow. Precisely, I see types as constituents of a domain, so also as = constituents of applications of the domain. I'm guessing I'm not the onl= y = one. We may diverge here, in short I would say: I don't want bricks giving th= e = illusions I may always be able to use it to build something which may or= = may not fails, I want bricks which will tell the sooner I will not be ab= le = to use it in some invalid ways if I want something which will not fail (= or = at least reduce potentials for failures, as program proof is more than = that). What I don't understand is: how something which give the illusion it has= = no prerequisites, can help in constructing safer and more trustable = architectures? Reusing is nice, however only where it, and in a way whic= h, = make sense for the domain (I don't believe an exception is meaningful, = that's not a value, that's a runtime error). Seems the invariably `True`= = precondition wants to give the illusion of universal reuse without = conditions. With all precondition moved to the postcondition, the progra= m = has more potential for erroneous interpretation, because that may turns = = into a lot more decision paths in the program after each invocation. I will not argue that much on this issue, as that may involves personal = = feeling. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity