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,a3471634bf10bf8d X-Google-Attributes: gid103376,public From: "Samuel T. Harris" Subject: Re: private type discriminants ignored? Date: 1998/05/01 Message-ID: <3549DEA1.342A8D56@hso.link.com>#1/1 X-Deja-AN: 349332282 Content-Transfer-Encoding: 7bit References: <35460201.ED1315C4@hso.link.com> <354612AF.41C6@hso.link.com> <35468F93.C371940@hso.link.com> Content-Type: text/plain; charset=us-ascii Organization: Raytheon Training Inc. Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-05-01T00:00:00+00:00 List-Id: Robert A Duff wrote: > > In article <35468F93.C371940@hso.link.com>, > Samuel T. Harris wrote: > >To one-up the pedantic theme :) Bob's "... unconstrained variable" > >appears several lines after "a default means that the discriminant > >can change". Perhaps I should have said "Not entirely complete." > > :-) > > Actually, what I *should* have said was, "The mere presence of a > defaulted discrim (in the type decl) means that it is possible to create > unconstrained variables of the type; the discriminants of such variables > can change (but only by whole-record assignment)." <-snip lots of good stuff -> > >The subtle differences are lost on many of our (my company's) > >Ada initiates and I have spent some time explaining the nuances > >of this construction, especially as applied to polymorphic variant > >records. > > I would blame that on non-intuitive language rules. Not on the poor > programmers, who reasonably, but incorrectly, think that default > expressions are for giving default values to discriminants. Just so. These initiates are simply new to Ada, not poor programmers. > > - Bob > -- Samuel T. Harris, Principal Engineer Raytheon Training Incorporated "If you can make it, We can fake it!"