home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19834 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  2.3 KB

  1. Path: sparky!uunet!seismo!darwin.sura.net!spool.mu.edu!uwm.edu!linac!att!cbnewsc!cbfsb!att-out!walter!grumpy!bytor
  2. From: bytor@grumpy.NoSubdomain.NoDomain (Ross Huitt)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C++ maintenance
  5. Message-ID: <1993Jan24.173522.12972@walter.bellcore.com>
  6. Date: 24 Jan 93 17:35:22 GMT
  7. References: <C1BnAy.C3F@geovision.gvc.com>
  8. Sender: bytor@grumpy (Ross Huitt)
  9. Distribution: na
  10. Organization: Bellcore
  11. Lines: 48
  12. Nntp-Posting-Host: grumpy.ctt.bellcore.com
  13.  
  14. The January '93 issue of IEEE Software is a special OO issue. One of the articles
  15. discusses at length some of the issues involved in maintaining OO software. This
  16. topic, in particular, is discussed. Check it out.
  17.  
  18.     -bytor
  19.  
  20. Ross Huitt
  21. bytor@ctt.bellcore.com
  22.  
  23. In article <C1BnAy.C3F@geovision.gvc.com>, djb@geovision.gvc.com (Darren Burns) writes:
  24. |> 
  25. |> I recently had the pleasure (not) of trying to track down a bug in
  26. |> some C++ code.  The author(s) of the code were not that experienced
  27. |> in C++, but I don't think that matters here.
  28. |> 
  29. |> I just wanted to get some comments about the following.  Suppose I'm
  30. |> looking at a C++ program.  I have a pretty good understanding of what
  31. |> it does, but I'm not terribly familiar with the code.  In a member
  32. |> function I see:
  33. |> 
  34. |> int the_class::do_something ( )
  35. |> {
  36. |> ...
  37. |>     foo->xxx();
  38. |> ...
  39. |> }
  40. |> 
  41. |> Now, I'm browsing through this code and I'm thinking maybe the bug I'm
  42. |> looking for is in xxx().  I want to take a look at it.  In order to know
  43. |> which xxx to look at (since there may be many classes that have xxx), I
  44. |> need to know what class foo is.  But foo could be a global variable,
  45. |> a member of the_class, or a variable local to the function.  I have to
  46. |> hunt all over the place just to find out where to look for xxx.
  47. |> 
  48. |> I find this a real pain.  I'm not experienced with C++, so maybe it's
  49. |> something you get used to.  I think that it's a general problem with
  50. |> OOP, although the syntax of the language can make it better or worse.
  51. |> It seems that C++ is great if you know the program very well (i.e. if
  52. |> you designed/wrote it), but is difficult to maintain.
  53. |> 
  54. |> Are there others who find the same thing?  Is there some way of setting
  55. |> things up to avoid this sort of problem?
  56. |> 
  57. |> Thanks.
  58. |> 
  59. |> (I never did find that bug, by the way :-))
  60. |> 
  61. |> Darren Burns
  62.