comp.lang.ada
 help / color / mirror / Atom feed
From: dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner)
Subject: Re: Generics - Difference between ADA and Modula--3
Date: 5 Feb 2001 23:50:53 GMT
Date: 2001-02-05T23:50:53+00:00	[thread overview]
Message-ID: <95ne8t$9281@news.cis.okstate.edu> (raw)
In-Reply-To: 95nc12$62m$1@usenet.rational.com

On Mon, 5 Feb 2001 15:12:20 -0800, Mark Lundquist <mark@rational.com> wrote:
>> Modula-3 compares types by value instead of by name, and introduces brands
>> to compensate for that.
>>
>
>What does this mean?  Can you explain this one some more?

type A is {Alpha, Beta, Gamma};
type B is {Alpha, Beta, Gamma};
type C is access A;
type D is access B;
type E is branded access A;
type F is branded access A;

In Ada, A, B, C, D, E and F are different types. In Modula 3, A & B are
the same type (because they have the same expanded form), and C & D are 
the same type. However, E and F are distinct from each other and C and D,
because of the brands.

-- 
David Starner - dstarner98@aasaa.ofe.org
Pointless website: http://dvdeug.dhis.org
"I don't care if Bill personally has my name and reads my email and 
laughs at me. In fact, I'd be rather honored." - Joseph_Greg



  reply	other threads:[~2001-02-05 23:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-30  4:48 Generics - Difference between ADA and Modula--3 John Baltomoire
2001-01-30 16:04 ` Mark Carroll
2001-02-02 18:35   ` David Starner
2001-02-05 20:51     ` Mark Carroll
2001-02-05 21:46       ` David Starner
2001-02-06  0:36         ` Jeffrey Carter
2001-02-05 22:46       ` Pat Rogers
     [not found]       ` <95p1p7$3s9$1@nnrp1.deja.com>
     [not found]         ` <slrn98049v.155.lutz@taranis.iks-jena.de>
2001-02-07 13:10           ` John English
2001-02-12 20:38       ` Mark Carroll
2001-02-05 23:12     ` Mark Lundquist
2001-02-05 23:50       ` David Starner [this message]
2001-02-06  0:03       ` David Starner
     [not found] <mailman.981529807.716.comp.lang.ada@ada.eu.org>
2001-02-07 14:52 ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox