comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: 'Protected' abstract subprograms
Date: Sun, 12 Jan 2014 11:19:41 +0200
Date: 2014-01-12T11:19:41+02:00	[thread overview]
Message-ID: <bjf514FdonuU1@mid.individual.net> (raw)
In-Reply-To: <14q37tx4uvbw4$.ua9oe7a01emv.dlg@40tude.net>

(I said I wouldn't, but here I go...)

On 14-01-11 21:35 , Dmitry A. Kazakov wrote:
> 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.

As I see it, it is you who are proposing a change: you say that
redispatch should never be used, so you are proposing a reduced Ada
language which does not *have* redispatch.

>>> 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?

Your concept of classes and types is stronger (more specific and
limiting) than what Ada provides -- in effect, you have certain design
rules which limit you to an Ada subset without redispatch. Ok, if you
find that these rules are beneficial to you, you are free to follow
them, and to suggest that others should follow them too. But you have
not convinced me that these rules are an improvement on the type model
that Ada provides, which includes redispatch.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
      .      @       .



  reply	other threads:[~2014-01-12  9:19 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
2014-01-12  9:19       ` Niklas Holsti [this message]
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