home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!seismo!darwin.sura.net!spool.mu.edu!uwm.edu!linac!att!cbnewsc!cbfsb!att-out!walter!grumpy!bytor
- From: bytor@grumpy.NoSubdomain.NoDomain (Ross Huitt)
- Newsgroups: comp.lang.c++
- Subject: Re: C++ maintenance
- Message-ID: <1993Jan24.173522.12972@walter.bellcore.com>
- Date: 24 Jan 93 17:35:22 GMT
- References: <C1BnAy.C3F@geovision.gvc.com>
- Sender: bytor@grumpy (Ross Huitt)
- Distribution: na
- Organization: Bellcore
- Lines: 48
- Nntp-Posting-Host: grumpy.ctt.bellcore.com
-
- The January '93 issue of IEEE Software is a special OO issue. One of the articles
- discusses at length some of the issues involved in maintaining OO software. This
- topic, in particular, is discussed. Check it out.
-
- -bytor
-
- Ross Huitt
- bytor@ctt.bellcore.com
-
- In article <C1BnAy.C3F@geovision.gvc.com>, djb@geovision.gvc.com (Darren Burns) writes:
- |>
- |> I recently had the pleasure (not) of trying to track down a bug in
- |> some C++ code. The author(s) of the code were not that experienced
- |> in C++, but I don't think that matters here.
- |>
- |> I just wanted to get some comments about the following. Suppose I'm
- |> looking at a C++ program. I have a pretty good understanding of what
- |> it does, but I'm not terribly familiar with the code. In a member
- |> function I see:
- |>
- |> int the_class::do_something ( )
- |> {
- |> ...
- |> foo->xxx();
- |> ...
- |> }
- |>
- |> Now, I'm browsing through this code and I'm thinking maybe the bug I'm
- |> looking for is in xxx(). I want to take a look at it. In order to know
- |> which xxx to look at (since there may be many classes that have xxx), I
- |> need to know what class foo is. But foo could be a global variable,
- |> a member of the_class, or a variable local to the function. I have to
- |> hunt all over the place just to find out where to look for xxx.
- |>
- |> I find this a real pain. I'm not experienced with C++, so maybe it's
- |> something you get used to. I think that it's a general problem with
- |> OOP, although the syntax of the language can make it better or worse.
- |> It seems that C++ is great if you know the program very well (i.e. if
- |> you designed/wrote it), but is difficult to maintain.
- |>
- |> Are there others who find the same thing? Is there some way of setting
- |> things up to avoid this sort of problem?
- |>
- |> Thanks.
- |>
- |> (I never did find that bug, by the way :-))
- |>
- |> Darren Burns
-