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