Re: Reduction expressions

Liste des GroupesRevenir à cl ada 
Sujet : Re: Reduction expressions
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.ada
Date : 21. Aug 2024, 01:30:54
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va38ve$3i3ne$11@dont-email.me>
References : 1 2 3
User-Agent : Pan/0.159 (Vovchansk; )
On Tue, 20 Aug 2024 22:23:27 +0100, Simon Wright wrote:

"Randy Brukardt" <randy@rrsoftware.com> writes:
 
Accum_Subtype (we changed the name since it is a subtype, not a type;
 
Amazing how a person (I) can have used Ada for ~40 years and still be
hard put to it to describe the difference, at least in a case like this
one, where the ARG members clearly see meanings that leave me lukewarm
if not cold. Maybe "the heart of twilight"?

I thought the difference was obvious. “subtype” is the C equivalent of
“typedef”, just giving a new name to an existing type. So

    subtype A is B;

(where A and B are simple identifiers) is valid, whereas

    type A is B;

is not: a “type” declaration always creates a new type: you have to write
at least

    type A is new B;

and now you have two types with different names that are structurally the
same, but not compatible.

Date Sujet#  Auteur
13 Aug 24 * Reduction expressions8Simon Wright
20 Aug 24 `* Re: Reduction expressions7Randy Brukardt
20 Aug 24  `* Re: Reduction expressions6Simon Wright
21 Aug 24   `* Re: Reduction expressions5Lawrence D'Oliveiro
21 Aug 24    +* Re: Reduction expressions2Keith Thompson
21 Aug 24    i`- Re: Reduction expressions1Lawrence D'Oliveiro
21 Aug 24    `* Re: Reduction expressions2Simon Wright
24 Aug 24     `- Re: Reduction expressions1Randy Brukardt

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal