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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Strange error message Date: Mon, 2 Jun 2014 14:56:30 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <33e17033-615d-43d4-8b47-9357c8875a10@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1401738991 7889 69.95.181.76 (2 Jun 2014 19:56:31 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 2 Jun 2014 19:56:31 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:20116 Date: 2014-06-02T14:56:30-05:00 List-Id: "Robert A Duff" wrote in message news:wcctx84qqgk.fsf@shell01.TheWorld.com... ... > [*] Your H_Val has a default of 0, so it might make sense to define > the language to provide an automatic default overriding: > > function Create return High is > begin > return (Base with H_Val => 0); > end Create; > > That's not how the language is now, and I suspect Dmitry and Randy > would be appalled at the idea. I don't really understand their > point of view -- I mean, I love consistency and all, but "A FOOLISH > consistency is the hobgloblin... etc". Not speaking for others, but my concern with automatically generating Create for null records is that it is a maintenance problem. When one later adds a component (and you ALWAYS end up adding a component sooner or later), you suddenly have to override a bunch of routines. This is extremely annoying, because the entire reason (for me at least) for declaring the null record is to get the structure (all of the routines that I need to implement) correct before I bother with any actual implementation. You can avoid the problem with a junk component, but that's nasty. I'd be happy if there was a way for the automatic construction to extend to other types as well. The one you suggested would work as well as any. I tried to make such a proposal in AI12-0083-1 (in response to a question from Adam), but it got approximately 0% support (which is why it's currently on the hold of death). I'm surprised that you suddenly are in favor of it now, because you surely weren't when we discussed it (or you missed that meeting). Randy.