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!feeder.eternal-september.org!gandalf.srv.welterde.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: Subtype or derived type? Date: Mon, 9 Oct 2017 16:50:18 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Mon, 9 Oct 2017 21:50:19 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="13163"; 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; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: news.eternal-september.org comp.lang.ada:48408 Date: 2017-10-09T16:50:18-05:00 List-Id: "Victor Porton" wrote in message news:orauq5$9tv$1@gioia.aioe.org... ... > I have two variants in mind: > > 1. > > subtype Node_Type is Term_Type; > > 2. > > type Node_Type is new Term_Type; > > Please advise which of the two is better. It depends on how you want to use the type/subtype, of course. If you need overridding/overloading, then you probably want a new type (a derived type), so the compiler can differentiate. If you need to convert back and forth a lot, you probably want a subtype (so the conversions are implicit rather than explicit). And so on... Randy.