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: a07f3367d7,ac4955b8006bd13c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.190.104 with SMTP id gp8mr1424694pbc.4.1338829595355; Mon, 04 Jun 2012 10:06:35 -0700 (PDT) Path: l9ni136pbj.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Q: type ... is new String Date: Mon, 4 Jun 2012 19:05:18 +0200 Organization: cbb software GmbH 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> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 4RFYTQ6jM/dAKFJoI0fUkg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-06-04T19:05:18+02:00 List-Id: On Mon, 04 Jun 2012 18:06:36 +0200, Georg Bauhaus wrote: > On 04.06.12 17:14, Dmitry A. Kazakov wrote: > >> malformed /= untyped. >> >> Typing is about a way to describe behavior. > > Well, yes, though in the web word, "type" may de facto mean "element type" > at best. The problem with strings is not that one could speak > about operations PUT, GET, DELETE, HEAD, and so on, and consider > these the behavior of something. The problem is data that cannot > reliably parsed and mapped to a set of properly typed objects. But > we still must have that information! You are mangling OSI layers. String in this case is merely a transport, or a container. Operations defined on the container type are not the operations of the things it may contain, nor the operations of the things the contained things may describe. The string may contain an Ada program and operations on the Ada source object could be something like ASIS, but that should have no effect on the implementation of String. > Everything in practice is implicit, ambiguous, indeterminable, > inconsistent. Wrong. In practice there are abstraction layers each of which is well-defined, except for the last one presented to the reader. There is nothing ambiguous in character encoding, network frames, states of gates. For a CPU, network adapter, graphic card etc to work, there is no need to know anything about the incomputable semantics of the web page rendered before the user. Similarly the parser of the page content containing "to be or not to be?" need not to answer such questions. For each possible input there is a defined output the parser should spill. Where is a problem? > 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. Note that *exactly* same misconception is behind dynamic preconditions of Eiffel now unfortunately introduced in Ada 2012. There is NO reject. There cannot be any reject. You have to handle every possible input state. You have no option to put a precondition on anybody except for very rare cases of which you can safely forget. That does not work in REAL world. Have courage to face it! -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de