comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <see.reply.to@maps.futureapps.de>
Subject: Re: MI is sloppy (was: Construction initialization problem)
Date: Sat, 06 Dec 2008 18:16:37 +0100
Date: 2008-12-06T18:16:37+01:00	[thread overview]
Message-ID: <493ab375$0$31872$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <d0goewygto13.10nsyzpabm3vn.dlg@40tude.net>

Dmitry A. Kazakov wrote:

>    type In_File is ...;
>    procedure Get (File : in out Input_File; Item : out Data);
> 
>    type Out_File is ...;
>    procedure Put (File : in out Output_File; Item : Data);
> 
>    type Inout_File is .. ?

OK, I can use an object of type Inout_File both as In_File or
as Out_File.  OTOH, I'm unsure about the notion of Inout_File.

Inout_File, despite being established in OSs, makes me think of
a new model water tap that at the same time acts as a drain.
I'd rather not approach this thing tired, with a razor in my hand...

Similarly, is it proper design to make a two-way street appear to
have only one polymorphic lane, i.e. think of streets as objects of
a single MI type? I wouldn't want to drive there unless a big, proven
apparatus of typing machinery, calling protocol, etc. makes sure
that my car won't be driving along the wrong view of the street.
I'm not sure but this seems like overhead to me. (Yes, I know there
are cabins and speed trains and normal trains being directed this
way. Without MI AFAIK, so I wonder how rail-bound traffic control
could profit from MI. Will there have to be additional contracts
for MI type that establish a proper order of object use?)

Can't we just make Inout_File some composition and hide the details
completely, behind a suitable collection of primitive operations?
The type would be private, opaque, and nothing else.



  reply	other threads:[~2008-12-06 17:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06 10:09 MI is sloppy (was: Construction initialization problem) Dmitry A. Kazakov
2008-12-06 17:16 ` Georg Bauhaus [this message]
2008-12-06 21:16   ` Martin Krischik
2008-12-06 21:35     ` Maciej Sobczak
2008-12-07  9:12   ` MI is sloppy Dmitry A. Kazakov
2008-12-07 15:38     ` Georg Bauhaus
2008-12-07 20:04       ` Dmitry A. Kazakov
2008-12-11  0:40 ` MI is sloppy (was: Construction initialization problem) Randy Brukardt
2008-12-11 10:02   ` MI is sloppy Dmitry A. Kazakov
2008-12-11 21:44     ` Randy Brukardt
2008-12-11 23:17       ` Georg Bauhaus
2008-12-12 10:06         ` Dmitry A. Kazakov
2008-12-12  9:59       ` Dmitry A. Kazakov
2008-12-12 10:50         ` Georg Bauhaus
2008-12-12 11:15           ` Dmitry A. Kazakov
2008-12-12 12:15             ` Georg Bauhaus
2008-12-12 13:35               ` Dmitry A. Kazakov
2008-12-12 14:29                 ` Georg Bauhaus
2008-12-12 14:59                   ` Dmitry A. Kazakov
2008-12-13  0:08                 ` Randy Brukardt
2008-12-13  9:54                   ` Dmitry A. Kazakov
replies disabled

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