home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / mac / system / 10212 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.8 KB  |  37 lines

  1. Newsgroups: comp.sys.mac.system
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!mips!mips!kpc!mikew
  3. From: mikew@kpc.com (Mike Wexler)
  4. Subject: Re: Windows NT (Not a flame.) and C++ comments
  5. Message-ID: <mikew.711754410@kpc.com>
  6. Sender: usenet@kpc.com
  7. Reply-To: mikew@kpc.com
  8. Organization: Kubota Pacific Computers Inc.
  9. References: <1992Jul21.124631.8584@msc.cornell.edu> <1992Jul21.192200.18180@tamsun.tamu.edu>
  10. Date: Tue, 21 Jul 1992 21:33:30 GMT
  11. Lines: 24
  12.  
  13. bpb9204@tamsun.tamu.edu (Brent) writes:
  14.  
  15. >maynard@esther.msc.cornell.edu (Maynard J. Handley) writes:
  16. >You are right, OOP is a good thing, but its features certainly can't be
  17. >used for everything.  I'd personally shudder at writing a UNIX C compiler
  18. >in C++.  What would the objects be?  Would they be function definitions?
  19. >Could they feasibly be individual statements where compound statement objects
  20. >would have other statement objects?  Yes, you could write it in C++ without
  21. >using all the object stuff, but the basic compilation process is too 
  22. >algorithmically intensive to bother with objects.  The ++ overhead would
  23. >slow down numerous method calls (the way C++ objects are implemented).
  24.  
  25.   Just like functional decomposition takes considerable thought when designing
  26. a program, object decomposition takes a lot of thought. Both can and often
  27. are done badly. Both have performance ramifications.
  28.   In the case of a compiler some of the obvious objects are things like 
  29. symbol tables, parse trees, and tokens. One thing to note, is that there
  30. is a tradeoff between the grain of the objects and the performance.
  31. For instance, if your objects are very coarse you have very little 
  32. C++ overhead, but very little gain from the object-orientedness. If you
  33. granularity is very small, everything is object-oriented, but the C++
  34. overhead because a much greater concern.
  35. --
  36. Mike Wexler (mikew@kpc.com)
  37.