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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Generic package parameters not externally visible : what's the rational ? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <10eygvuzeit9g.xwy2wanxoxgf$.dlg@40tude.net> <1kf8mo4r9lqxg.1tdhqe6femt9m.dlg@40tude.net> Date: Fri, 30 Oct 2009 09:51:37 +0100 Message-ID: <1tnvy8u03rsnd$.yrxpacmavkdw$.dlg@40tude.net> NNTP-Posting-Date: 30 Oct 2009 09:51:37 CET NNTP-Posting-Host: b3c8110b.newsspool4.arcor-online.net X-Trace: DXC=OfPR=mkWbX=C X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:8879 Date: 2009-10-30T09:51:37+01:00 List-Id: On Thu, 29 Oct 2009 18:03:02 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" 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