comp.lang.ada
 help / color / mirror / Atom feed
From: kehs@east.alsys.com (David Kehs)
Subject: Re: Naive question about system dependencies
Date: Thu, 22 Sep 1994 13:33:53 GMT
Date: 1994-09-22T13:33:53+00:00	[thread overview]
Message-ID: <CwJ9oH.8K@alsys.com> (raw)
In-Reply-To: 85B716C4188@annwfn.com

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.



  parent reply	other threads:[~1994-09-22 13:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-09-15  6:32 Naive question about system dependencies Howard Holm
1994-09-16 17:28 ` Tucker Taft
1994-09-17 16:23   ` Mats Weber
1994-09-19 12:05     ` Ted Dennison
1994-09-19 14:39       ` Cyrille Comar
1994-09-19 15:00       ` Norman H. Cohen
1994-09-20  9:02       ` Stephen J Bevan
     [not found]     ` <85B716C4188@annwfn.com>
1994-09-22 13:33       ` David Kehs [this message]
1994-09-22 14:15       ` Robert Dewar
1994-09-23  4:34         ` R. William Beckwith
1994-09-22 14:54       ` Norman H. Cohen
  -- strict thread matches above, loose matches on Subject: below --
1994-09-19 14:48 Bob Crispen
replies disabled

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