comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: 'Protected' abstract subprograms
Date: Sat, 11 Jan 2014 20:35:46 +0100
Date: 2014-01-11T20:35:46+01:00	[thread overview]
Message-ID: <14q37tx4uvbw4$.ua9oe7a01emv.dlg@40tude.net> (raw)
In-Reply-To: bjd02bF1s1U1@mid.individual.net

On Sat, 11 Jan 2014 15:42:39 +0200, Niklas Holsti wrote:

>> * When you dispatch in a body of an operation that means that the body is
>> valid for more than one type. Many types = class. Operation for all class =
>> class-wide operation.
> 
> Yes, but "many types" is not the same as "all class".

Per design pattern it is all class. Anyway, it is certainly not the
singleton type specified in the pattern, because that is type is abstract.

But of course, if you want to propose changes in the language which would
allow specification of narrower subclasses for such cases, it would be most
welcome.

>> Re-dispatch breaks this model and effectively makes your design
>> un/weakly typed.
> 
> I don't agree, because my conceptual "model" is different. Your model is
> stronger (more specific) than mine, which paradoxically means that it is
> easier to break :-)

Wouldn't that be arguing against strong typing?

The point is that the thing is semantically inconsistent with the types as
annotated. You can say that it is the types here to blame, let's do less
typing. I say, that types are OK, they must be used correctly and not
fought against.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2014-01-11 19:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 22:00 'Protected' abstract subprograms sbelmont700
2014-01-10 22:30 ` Randy Brukardt
2014-01-11 16:12   ` sbelmont700
2014-01-14  3:45     ` Randy Brukardt
2014-01-14  9:05       ` Dmitry A. Kazakov
2014-01-15  0:36         ` Randy Brukardt
2014-01-15  9:17           ` Dmitry A. Kazakov
2014-01-15 14:11             ` Robert A Duff
2014-01-15 15:40               ` adambeneschan
2014-01-15 21:21                 ` Robert A Duff
2014-01-15 23:10                   ` Randy Brukardt
2014-01-16  0:51                     ` Robert A Duff
2014-01-16 10:43                       ` AdaMagica
2014-01-16 16:32                         ` adambeneschan
2014-01-17  1:49                         ` Robert A Duff
2014-01-17 23:23                           ` Randy Brukardt
2014-01-19 21:07                             ` Robert A Duff
2014-01-20  8:40                               ` Dmitry A. Kazakov
2014-01-21 14:37                                 ` Robert A Duff
2014-01-22  8:27                                   ` Dmitry A. Kazakov
2014-01-21  1:21                               ` Randy Brukardt
2014-01-21 14:35                                 ` Robert A Duff
2014-01-15 23:17               ` Randy Brukardt
2014-01-16  8:52               ` Dmitry A. Kazakov
2014-01-11  8:41 ` J-P. Rosen
2014-01-11  8:59 ` Dmitry A. Kazakov
2014-01-11 13:42   ` Niklas Holsti
2014-01-11 19:35     ` Dmitry A. Kazakov [this message]
2014-01-12  9:19       ` Niklas Holsti
2014-01-12 10:22         ` 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