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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,75ffc1f081ec10e3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!newshub.sdsu.edu!newsfeed.news2me.com!newsfeed2.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!sn-xt-sjc-02!sn-xt-sjc-09!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail From: "ME" Newsgroups: comp.lang.ada Subject: Re: Constant record components Date: Mon, 3 Jul 2006 09:31:27 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <12aihj2lrjqpc3a@corp.supernews.com> References: <12ad8guf3sg1o0d@corp.supernews.com> <1loq7utmaxvll$.yqsxj5edzqgv.dlg@40tude.net> <12afs64kh432q0e@corp.supernews.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-Complaints-To: abuse@supernews.com Xref: g2news2.google.com comp.lang.ada:5435 Date: 2006-07-03T09:31:27-07:00 List-Id: "Dmitry A. Kazakov" wrote in message news:t7hmlpeqyass.1fjxzy2pl8z82$.dlg@40tude.net... > On Sun, 2 Jul 2006 09:13:54 -0700, ME wrote: > >> "Dmitry A. Kazakov" wrote in message >> news:1loq7utmaxvll$.yqsxj5edzqgv.dlg@40tude.net... >>> On Sat, 1 Jul 2006 09:25:06 -0700, ME wrote: >>> >>>> What was the rationale for prohibiting constant record components? >>> >>> Initialization and composition issues. Then often it is argued that >>> discriminants are, though limited. > >> What were these issues? > > You should ask language lawyers. Consider aggregates: > > type Semimutable is record > A : constant Integer := 10; > B : Integer; > end record; > > X : Semimutable := (A => 20, B => 40); -- Constraint_Error? > Y : Semimutable := (A => 10, B => 40); > > It might become tricky when A is a composite or private type. Should it > finalize the component and initialize it *same*? In which sense same? Does > it skip A upon assignments? Yes, why not. Anyway , discriminants allow a type of constant component so the mechanism is possible. > > -- > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de