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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d694b5818a5102b1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-22 08:11:43 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!swrinde!sgiblab!pacbell.com!uop!csus.edu!netcom.com!netcomsv!telesoft!east.alsys.com!kehs From: kehs@east.alsys.com (David Kehs) Subject: Re: Naive question about system dependencies Message-ID: Sender: news@alsys.com Organization: Alsys Inc, Burlington, MA, USA References: <35f559$mad@info.epfl.ch> <85B716C4188@annwfn.com> Date: Thu, 22 Sep 1994 13:33:53 GMT Date: 1994-09-22T13:33:53+00:00 List-Id: In <85B716C4188@annwfn.com> merlin@annwfn.com (Fred McCall) writes: >One thing to be *very* wary of -- during maintenance, if you find and >fix a bug in one variant, you'd better check all those other alternate >bodies for the same bug and apply the same fix. I agree with the >difficulty of reading heavily ifdef'd sources, but they do have the >advantage of putting all the source code in one place (which simplifies >source control on bug fixes). If you find yourself needing to apply the same fix in lots of different variants, it probably means that your decomposition could stand improvement. If the same code sequence is repeated in several variants, that sequence should be separated out (possibly as a generic) so that you need to keep only one copy of the source text. Then, if a fix is needed, you'll only have to do it in one place, and you still won't need ifdef's. Of course, it's not always easy to pull this off in practice. Dave Kehs -- opinions expressed here are purely my own.