comp.lang.ada
 help / color / mirror / Atom feed
From: "J-P. Rosen" <rosen@adalog.fr>
Subject: Re: Style Question: normal record vs discriminated null-record.
Date: Tue, 03 Jun 2014 06:40:16 +0200
Date: 2014-06-03T06:40:16+02:00	[thread overview]
Message-ID: <lmjjjg$1lf$2@dont-email.me> (raw)
In-Reply-To: <lmjjge$1lf$1@dont-email.me>

Le 03/06/2014 06:38, J-P. Rosen a écrit :
> Depends how you perceive your data. Discriminants are intended to define
> some kind of subclasses of your type, and can be used to parameterized
> inner components. Some criteria for you to chose:
> 
> - You can define subtypes according to certain values of discriminants.
> 
> - Discriminants are always initialized.
> 
> - Discriminants cannot be changed after the declaration.
> 
And I forgot:

- You can have a private type whose discriminants are visible (and
components private)

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr


  reply	other threads:[~2014-06-03  4:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03  2:44 Style Question: normal record vs discriminated null-record Shark8
2014-06-03  4:38 ` J-P. Rosen
2014-06-03  4:40   ` J-P. Rosen [this message]
2014-06-03  6:20   ` Shark8
2014-06-03  7:19 ` 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