From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: derived formal types and known discriminants
Date: Fri, 30 Jun 2017 13:09:58 -0500
Date: 2017-06-30T13:09:58-05:00 [thread overview]
Message-ID: <oj645n$iq3$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: oj4ubr$190j$1@gioia.aioe.org
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
news:oj4ubr$190j$1@gioia.aioe.org...
> On 30/06/2017 03:10, Randy Brukardt wrote:
>
>> Surely, but no real loss. Using discriminants with tagged types is pretty
>> rare in itself.
>
> Access discriminants are needed to work around lack of constructors and
> full multiple inheritance. That is when one object refers to its separate
> part via an access discriminant.
Possibly, but that seems hard to work with. And as someone that rarely sees
the value of inheritance in the first place, I doubt I would bother trying.
YMMV.
> Value discriminants are needed for having components of unconstrained
> types.
Sure, but they're very inflexible in that usage (as bad or worse than the
original unconstrained types). So I tend to view these as an either/or
proposition: untagged, mutable types with discriminants, or tagged types
without discriminants. Again, YMMV.
Randy.
next prev parent reply other threads:[~2017-06-30 18:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 0:45 derived formal types and known discriminants sbelmont700
2017-06-23 17:26 ` Randy Brukardt
2017-06-29 14:15 ` sbelmont700
2017-06-29 14:39 ` Dmitry A. Kazakov
2017-06-29 17:40 ` Robert Eachus
2017-06-30 1:10 ` Randy Brukardt
2017-06-30 7:24 ` Dmitry A. Kazakov
2017-06-30 18:09 ` Randy Brukardt [this message]
2017-07-04 0:30 ` sbelmont700
2017-07-04 1:36 ` gautier_niouzes
2017-07-04 2:29 ` Randy Brukardt
2017-07-04 7:09 ` Dmitry A. Kazakov
2017-07-04 17:34 ` Shark8
2017-07-03 17:24 ` Jere
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox