comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: [Newbie] doubly constrained array, dumb question
Date: Tue, 27 Feb 2018 18:37:46 +0100
Date: 2018-02-27T18:37:46+01:00	[thread overview]
Message-ID: <p74519$o3p$1@gioia.aioe.org> (raw)
In-Reply-To: p743ao$k6h$1@dont-email.me

On 2018-02-27 18:08, G. B. wrote:
> Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:
>> On 27/02/2018 02:29, Mehdi Saada wrote:
>>
>>> For 8: a class has any sense at all only if there's no dispatching to an
>>> inexistent method, and your forbidding some methods would do the same, raise an exception.
>>
>> Not in the case of subtypes. For example, the "class" Integer of which
>> Positive is a "member"
> 
> Or a subset, rather? All x in Positive are such that
> x in Integer, but Positive is not an element of Integer.

Subsetting is an "implementation" to subclassing. The latter also 
inherits operations as Positive does. Subsetting is silent about operations.

Note that even unary minus is inherited and kind of works, because 
Constraint_Error is a part of the contract. That is a way around LSP ...

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


  reply	other threads:[~2018-02-27 17:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 16:26 [Newbie] doubly constrained array, dumb question Mehdi Saada
2018-02-26 17:02 ` J-P. Rosen
2018-02-26 21:40   ` Dmitry A. Kazakov
2018-02-26 23:26   ` Randy Brukardt
2018-02-27  9:01     ` Simon Wright
2018-02-27 22:11       ` Randy Brukardt
2018-02-26 20:52 ` Niklas Holsti
2018-02-27  1:29 ` Mehdi Saada
2018-02-27  9:18   ` Dmitry A. Kazakov
2018-02-27 11:43     ` Mehdi Saada
2018-02-27 14:19       ` Dmitry A. Kazakov
2018-02-27 17:08     ` G. B.
2018-02-27 17:37       ` Dmitry A. Kazakov [this message]
2018-02-27 14:34   ` Jere
2018-02-27 15:13     ` Dmitry A. Kazakov
2018-02-27  7:38 ` Jacob Sparre Andersen
replies disabled

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