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: a07f3367d7,ac4955b8006bd13c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.68.238.65 with SMTP id vi1mr11484432pbc.7.1338841782260; Mon, 04 Jun 2012 13:29:42 -0700 (PDT) Path: l9ni1595pbj.0!nntp.google.com!news1.google.com!news.glorb.com!gegeweb.org!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: Q: type ... is new String Date: Mon, 04 Jun 2012 22:28:29 +0200 Organization: Ada @ Home Message-ID: References: <82defba0-2d39-4418-b678-ebbefeb105d7@x21g2000vbc.googlegroups.com> <4fcccd1f$0$6583$9b4e6d93@newsspool3.arcor-online.net> <4fccdd0c$0$6578$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: yDpX2+LQhXb1DnQ6tHbweQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.00 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-06-04T22:28:29+02:00 List-Id: Le Mon, 04 Jun 2012 19:05:18 +0200, Dmitry A. Kazakov = a =C3=A9crit: >> This may be a consequence of the attitude in the web, >> which does not normally use "type" at all. Not at the level of >> system integration, where it matters. The AI job, then, is to look >> at the forms and try to make sense, even when things are malformed. >> REJECT is not an option. > > Yes, this is a consequence of a misconception. At least HTML5 addresses this, as it specifies malformed input handling.= > Note that *exactly* same > misconception is behind dynamic preconditions of Eiffel now unfortunat= ely > introduced in Ada 2012. There's nothing wrong with it, and it does not betray Ada's spirit, as i= t = helps to catch errors as much soon as possible. When an error is not (or= = cannot be) caught at compile time, that's still better to catch it the = sooner at runtime, rather than after a long chain of consequences which = = hides the error origination. That's what dynamic check of contracts is = for. After all, we have runtime range=E2=80=91check, since Ada's birth, = which is = similar. I don't understand your frequent griefs against runtime check of = contracts. Anyway, this does not prevent anyone to statically prove a = program with SPARK (or may be Coq) if one is able to. If you can't, you = = just still have the option of runtime checking contracts, which is bette= r = than nothing. -- = =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