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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c459ff0adb576bc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-02 16:19:36 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!ppp-1-189.5800-14.telinco.NET!not-for-mail From: "Nick Roberts" Newsgroups: comp.lang.ada Subject: Re: Refactoring and Ada Date: Sun, 3 Feb 2002 00:21:50 -0000 Message-ID: References: <3C5AB0B7.9D75D49A@grammatech.com> NNTP-Posting-Host: ppp-1-189.5800-14.telinco.net (212.1.148.189) X-Trace: fu-berlin.de 1012695573 42055287 212.1.148.189 (16 [25716]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:19544 Date: 2002-02-03T00:21:50+00:00 List-Id: "Pat Rogers" wrote in message news:V4Y68.326$xE7.126341269@newssvr12.news.prodigy.com... > > I suspect that, in the case of Ada, refactoring in support of legacy code is > > unlikely in practice. This is largely because Ada 95 contains virtually no > > incompatibilties with Ada 83, and added no features so valuable that it > > would make it desirable to refactor Ada 83 code to use those features. > > That last phrase is an amazing assertion! Surely you don't mean it the way it > looks! Yes I did! > As a counter example, I know of a number of projects that have replaced some of > their tasks with protected objects. I think it's arguable whether that actually counts as refactoring. Do the semantics really remain the same (as opposed to 'effectively the same')? To clarify, could the change have been made, safely, by a purely mechanised algorithm? (I don't think so. And if it could, the algorithm would have to be fiendishly complex, no?) > On a much smaller scale of feature, I know > of projects that have removed a great many "renames clauses" with "use type" > clauses. As ever, I stand to be corrected. I have never personally heard of any Ada 83 program being re-engineered into Ada 95 whilst -- and this is the crucial bit -- retaining the same semantics (not just 'effectively the same', as above). That is to say, often Ada 83 code is converted into Ada 95, and it it may end up doing the same job as before (and even having the same interface), but always the semantics are actually changed somehow, however subtly. Most of the new features of Ada 95 have semantics that are different to anything Ada 83 had, so changing from Ada 83 to Ada 95 tends to necessitate a change of semantics. The changes in Ada 95 which replaced one (Ada 83) construct with another of (potentially) equal meaning were few and fairly esoteric (e.g. the Import and Export pragmas versus the Interface pragma); furthermore, the old construct was nearly always retained anyway, so there is very rarely a real need to change the old code. Some Ada 83 programs with identifiers that became reserved words (e.g. "Requeue") had to be changed. (Enough wittering. You get the gist ;-) -- Nick Roberts