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!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!lust.ihug.co.nz!ihug.co.nz!not-for-mail From: Craig Carey Newsgroups: comp.lang.ada Subject: Re: Constant record components Date: Fri, 14 Jul 2006 20:15:53 +1200 Organization: Ihug Ltd Message-ID: References: <1loq7utmaxvll$.yqsxj5edzqgv.dlg@40tude.net> <12afs64kh432q0e@corp.supernews.com> <12aihj2lrjqpc3a@corp.supernews.com> <7bednaJHX_FTMDTZnZ2dnUVZ_uudnZ2d@megapath.net> <12ak5urrrj6d756@corp.supernews.com> <12arsrtbe8flpf8@corp.supernews.com> NNTP-Posting-Host: 203.118.188.194 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: lust.ihug.co.nz 1152864894 19914 203.118.188.194 (14 Jul 2006 08:14:54 GMT) X-Complaints-To: abuse@ihug.co.nz NNTP-Posting-Date: Fri, 14 Jul 2006 08:14:54 +0000 (UTC) X-Newsreader: Forte Agent 3.1/32.783 Xref: g2news2.google.com comp.lang.ada:5683 Date: 2006-07-14T20:15:53+12:00 List-Id: On Fri, 7 Jul 2006 16:04:13 -0500, "Randy Brukardt" wrote: >The problem with that is that the Initialize routine is just an ordinary >subprogram. That means that either constant components can't be initialized >with them (only directly when the object is created), or you have to have >some rule like "they're read-write in the body", which is what is >disgusting. And remember that Initialize isn't the only routine of this >type; user-defined Read and Input routines also need this property. > >There are also issues on complete record assignment of objects with constant >components: what happens if one of the constant components changes? If it >doesn't change (raises Constraint_Error), then you have a discriminant >(effectively); if it does change, then how constant is it?? > >There may in fact be a solution to these issues, but it has never seemed >important enough to spend the intensive effort needed to find one. > > Randy. > Why is the argument (if any) all behind the single word. Surely you can undo years of reputation building with that single trick alone. It seems worse that the word "disgusting" seems to disclose the existence of a purpose that is a proper topic for inquiry by concealing the words read-only after this Usenet thread had a sustained failure at realizing that the word "constant" in the title means read-only rather than 'constant'. Brukardt is a notable incompetent at language design; with his black snout pressed in the back of the polar bear jesery of the great Ada maritime captains stranded on ice when their ship got frozen in. It all has to do with money$$; the lax pleasure of besting out the whole "previous brain-thought" behind a 1-word argument. Voltage levels for the rest -- collectors of views for re-sale? I note there can be a lot more parameter passing modes than Ada's "in" and "out" and "in out". Eg. record fields currently have the PASCAL style 'in' mode, ie. the initial value can be modifed. There is always the ARG contempt for questions technique. Craig Carey