comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Variant record question
Date: 2000/01/21
Date: 2000-01-21T00:00:00+00:00	[thread overview]
Message-ID: <wccr9fbchbg.fsf@world.std.com> (raw)
In-Reply-To: 4V0i4.622$dw3.29725@news.wenet.net

"Mike Silva" <mjsilva@jps.net> writes:

>...Why must
> I put in a default discriminant when I can then override it in an aggregate
> (variable 'A' below)?

It was a design goal of Ada 83 that it should be impossible to have an
uninitialized discriminant.  Therefore, if you don't want to give a
value when you create each object, you have to have a default.

Also, having a default means that there can exist objects of the type
whose discriminant can change (unless the record is limited).  That's
weird, IMHO -- there should have been a separate syntax for that.  This
rule always seems to confuse people.

It was also a dresign goal that array components should always have the
same size.

- Bob




  reply	other threads:[~2000-01-21  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-21  0:00 Variant record question Mike Silva
2000-01-21  0:00 ` Robert A Duff [this message]
2000-01-21  0:00 ` Ted Dennison
2000-01-21  0:00 ` Matthew Heaney
replies disabled

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