comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Strange error message
Date: Mon, 2 Jun 2014 14:56:30 -0500
Date: 2014-06-02T14:56:30-05:00	[thread overview]
Message-ID: <lmikte$7mh$1@loke.gir.dk> (raw)
In-Reply-To: wcctx84qqgk.fsf@shell01.TheWorld.com

"Robert A Duff" <bobduff@shell01.TheWorld.com> 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.


  parent reply	other threads:[~2014-06-02 19:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01 10:24 Strange error message Charly
2014-06-01 11:11 ` Dmitry A. Kazakov
2014-06-01 12:50   ` Charly
2014-06-01 13:54     ` Simon Wright
2014-06-01 21:18 ` Robert A Duff
2014-06-02  7:47   ` Dmitry A. Kazakov
2014-06-02 13:49     ` Robert A Duff
2014-06-02 14:55       ` Dmitry A. Kazakov
2014-06-02 17:24         ` Robert A Duff
2014-06-02 18:39       ` Shark8
2014-06-02 19:56   ` Randy Brukardt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-13 10:36 strange " evangeli
2002-11-13 15:05 ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox