comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Q: type ... is new String
Date: Mon, 4 Jun 2012 19:05:18 +0200
Date: 2012-06-04T19:05:18+02:00	[thread overview]
Message-ID: <zsk0ul695neq.184hx8ckz554b$.dlg@40tude.net> (raw)
In-Reply-To: 4fccdd0c$0$6578$9b4e6d93@newsspool3.arcor-online.net

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



  reply	other threads:[~2012-06-04 17:06 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 16:33 Q: type ... is new String tmoran
2012-05-30 17:04 ` Dmitry A. Kazakov
2012-05-31  7:37 ` Maciej Sobczak
2012-06-04  5:58   ` Yannick Duchêne (Hibou57)
2012-06-04  6:30     ` J-P. Rosen
2012-06-04  7:48       ` Yannick Duchêne (Hibou57)
2012-06-04  8:03         ` Dmitry A. Kazakov
2012-06-04  8:14           ` Yannick Duchêne (Hibou57)
2012-06-04  9:09             ` Dmitry A. Kazakov
2012-06-04 10:35         ` J-P. Rosen
2012-06-04  5:43 ` Yannick Duchêne (Hibou57)
2012-06-04 11:39 ` Brian Drummond
2012-06-04 13:36   ` Maciej Sobczak
2012-06-04 14:58     ` Georg Bauhaus
2012-06-04 15:14       ` Dmitry A. Kazakov
2012-06-04 16:06         ` Georg Bauhaus
2012-06-04 17:05           ` Dmitry A. Kazakov [this message]
2012-06-04 20:28             ` Yannick Duchêne (Hibou57)
2012-06-04 20:56             ` Georg Bauhaus
2012-06-05  7:32               ` Dmitry A. Kazakov
2012-06-05  8:40                 ` Georg Bauhaus
2012-06-05  9:06                   ` Dmitry A. Kazakov
2012-06-05 12:20                     ` Georg Bauhaus
2012-06-05 13:14                       ` Dmitry A. Kazakov
2012-06-06  4:09                       ` Shark8
2012-06-06  8:52                         ` Georg Bauhaus
2012-06-06 23:56                       ` Randy Brukardt
2012-06-07 11:15                         ` Georg Bauhaus
2012-06-06 23:51                 ` Randy Brukardt
2012-06-04 20:33         ` Yannick Duchêne (Hibou57)
2012-06-04 21:27           ` Georg Bauhaus
     [not found]             ` <m9kqs7hgii13e220b1phm46n43d92tu1pj@invalid.netcom.com>
2012-06-05  6:15               ` Georg Bauhaus
2012-06-05  6:36                 ` Yannick Duchêne (Hibou57)
2012-06-06  4:14               ` Shark8
2012-06-07  0:01             ` Randy Brukardt
2012-06-07  0:20               ` Adam Beneschan
2012-06-05 12:05     ` Brian Drummond
2012-06-05 14:43       ` Yannick Duchêne (Hibou57)
2012-06-04 15:54   ` Shark8
2012-06-04 22:01     ` Jeffrey Carter
2012-06-05 12:10       ` Brian Drummond
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox