From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: derived formal types and known discriminants Date: Fri, 30 Jun 2017 13:09:58 -0500 Organization: JSA Research & Innovation Message-ID: References: <82a59ee9-8d55-4c73-9daf-e9f7d9ab8a8f@googlegroups.com> Injection-Date: Fri, 30 Jun 2017 18:09:59 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="19267"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:47236 Date: 2017-06-30T13:09:58-05:00 List-Id: "Dmitry A. Kazakov" 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.