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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,22ea9f82aa6070da X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Variant record question Date: 2000/01/21 Message-ID: #1/1 X-Deja-AN: 575860896 Sender: bobduff@world.std.com (Robert A Duff) References: <4V0i4.622$dw3.29725@news.wenet.net> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-01-21T00:00:00+00:00 List-Id: "Mike Silva" 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