comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Generic package parameters not externally visible : what's the rational ?
Date: Fri, 30 Oct 2009 09:51:37 +0100
Date: 2009-10-30T09:51:37+01:00	[thread overview]
Message-ID: <1tnvy8u03rsnd$.yrxpacmavkdw$.dlg@40tude.net> (raw)
In-Reply-To: hcd6v8$pve$1@munin.nbi.dk

On Thu, 29 Oct 2009 18:03:02 -0500, Randy Brukardt wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message 
> news:1kf8mo4r9lqxg.1tdhqe6femt9m.dlg@40tude.net...
> ...
>> I don't think we should much care about backward compatibility with regard
>> to generics.
> 
> Well, I doubt that would be very popular with anyone that has existing Ada 
> code that they want to use with the latest version of the language.
> 
> As Robert Dewar says, incompatibilities have a very high bar. There has to 
> be real and compelling value for an incompatibility. I don't see that in 
> this case that that it not clear that the revised situation is really better 
> than the current one -- it's mostly a sideways move.

True, but there are two very different cases, depending on whether the
change is in the semantics or else detected by the compiler. The latter is
not a big issue. If we one day decided to use the word "kill" instead of
"abort", that would be rather minor nuisance. But if we decided that
"abort" would spawn a copy of the task, that would be a catastrophe.

>> My take is that any generic code is potentially broken. Anyone who uses
>> generics beyond very trivial cases should know that, and mentally prepare
>> himself to fix his code over and over again.
> 
> That's pretty cynical.

Yes. After years of using generics you have to become cynical. (:-))

> Most of time, once you get your generic working, you 
> hardly every touch it again.

Huh, I have lost my illusions long ago. It stays fixed right until a next
compiler bug or a next fix of a compiler bug. Most of the generics are in
half workarounds for programmer's misunderstanding of how generics actually
work, for some compiler bugs, for some silly language limitations.

> Besides, you could make the above statement for 
> almost any Ada (or other programming language) code when it is reused.

To some extent, but the difference is qualitative. The only other Ada issue
of comparable damaging potential is the lack of exception contracts. My
personal estimation is that about 20% of time is spent on fixing generics
and 20-30% on catching unexpected exceptions.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2009-10-30  8:51 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26  8:58 Generic package parameters not externally visible : what's the rational ? Hibou57 (Yannick Duchêne)
2009-10-26 11:05 ` Ludovic Brenta
2009-10-26 15:02   ` Robert A Duff
2009-10-27  1:06   ` Hibou57 (Yannick Duchêne)
2009-10-26 14:56 ` Robert A Duff
2009-10-27  3:03   ` Hibou57 (Yannick Duchêne)
2009-10-27 21:08   ` Randy Brukardt
2009-10-27 21:36     ` Jeffrey R. Carter
2009-10-27 22:03       ` Hibou57 (Yannick Duchêne)
2009-10-27 22:19         ` Jeffrey R. Carter
2009-10-28 19:07         ` Randy Brukardt
2009-10-29 12:18           ` Hibou57 (Yannick Duchêne)
2009-10-29 22:56             ` Randy Brukardt
2009-10-30  0:10               ` Hibou57 (Yannick Duchêne)
2009-10-27 22:04       ` Hibou57 (Yannick Duchêne)
2009-10-27 23:37       ` Robert A Duff
2009-10-27 23:41         ` Jeffrey R. Carter
2009-10-27 23:34     ` Robert A Duff
2009-10-28  2:19       ` Hibou57 (Yannick Duchêne)
2009-10-28 19:12         ` Randy Brukardt
2009-10-29  7:34           ` Stephen Leake
2009-10-29 12:21           ` Hibou57 (Yannick Duchêne)
2009-10-29 13:10             ` AdaMagica
2009-10-29 15:11               ` Georg Bauhaus
2009-10-29 19:28                 ` Jeffrey R. Carter
2009-10-29 20:27                   ` Georg Bauhaus
2009-10-30 10:30               ` Stephen Leake
2009-10-30 17:53             ` Ludovic Brenta
2009-10-31  2:10               ` Hibou57 (Yannick Duchêne)
2009-10-30  5:19           ` Hibou57 (Yannick Duchêne)
2009-10-28  9:09     ` Dmitry A. Kazakov
2009-10-28 19:19       ` Randy Brukardt
2009-10-29  8:36         ` Dmitry A. Kazakov
2009-10-29 23:03           ` Randy Brukardt
2009-10-30  8:51             ` Dmitry A. Kazakov [this message]
2009-10-30 10:25           ` Stephen Leake
2009-10-30 19:32             ` Dmitry A. Kazakov
2009-10-31  2:06               ` Hibou57 (Yannick Duchêne)
2009-10-31  9:14                 ` Dmitry A. Kazakov
2009-11-03  8:25                   ` Hibou57 (Yannick Duchêne)
2009-11-03  9:59                     ` Dmitry A. Kazakov
2009-11-05 10:38                       ` Hibou57 (Yannick Duchêne)
2009-11-05 11:00                         ` Dmitry A. Kazakov
2009-11-05 12:16                           ` Hibou57 (Yannick Duchêne)
2009-11-05 14:09                             ` Dmitry A. Kazakov
2009-11-06 12:19                               ` Hibou57 (Yannick Duchêne)
2009-11-06 13:27                                 ` Dmitry A. Kazakov
2009-10-31  2:08               ` Hibou57 (Yannick Duchêne)
2009-10-31 12:44               ` Stephen Leake
2009-11-01 11:37                 ` Dmitry A. Kazakov
replies disabled

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