home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object
- Path: sparky!uunet!spool.mu.edu!wupost!m.cs.uiuc.edu!johnson
- From: johnson@m.cs.uiuc.edu (Ralph Johnson)
- Subject: Re: Why is garbage collecting considered intregral to OOPS?
- Message-ID: <1992Sep15.165046.27403@m.cs.uiuc.edu>
- Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
- References: <15SEP199210250016@rosie.uh.edu>
- Date: Tue, 15 Sep 1992 16:50:46 GMT
- Lines: 38
-
- st1lv@rosie.uh.edu (McLeod, Stephen) writes:
-
- >Hi. I'm boning up on OOPS right now and the book I'm using said that without
- >automatic garbage collection, it is not OOP/OOD. Why is this the case? The
- >book is rather unclear on this particular point.
-
- First, most people don't think that g.c. is integral to OOP. However,
- some people do, so the question still stands: why do some people consider
- g.c. integral to OOP?
-
- This is a question that has intrigued me for some time. The people who
- state in writing that g.c. is part of OOP are generally people that I
- respect (Bertrand Meyers and Dan Ingalls come to mind), so I don't just
- reject their comments out of hand. However, it has always been hard for
- me to see why Object Pascal, Objective C, or C++ aren't object-oriented,
- because the same design patterns that work well with Smalltalk or Eiffel
- also work well with them. I have come to the conclusion (right or wrong)
- that people see g.c. as integral to OOP because g.c. makes software much
- more reusable, and reuse is a major motivation for OOP. G.c. makes it
- much easier to think about objects as independent entities that control
- their own destiny. It lets us abstract away from the low-level details
- of running programs.
-
- I'm a big fan of g.c., and it clearly makes software easier to write
- and more reusable (unless you are writing real-time software), but I
- think it is not essential to OOP. Of course, there really isn't a
- single standard definition of OOP, and some of the definitions vary
- widely. Peter Wegner's definition (OOSPLA 88? 87?) is pretty widely
- used. On the other extreme, the Scandinavian school defines
- object-oriented programming as writing a program that is a simulation.
- When I first saw that definition, I was completely bewildered, but as
- time goes on I like it more and more. Although there certainly are
- lots of simulations that are not object-oriented, a good object-oriented
- design is a simulation of the system you are modeling, even (especially?)
- if the system is an artificial one. So, the point is to be a little
- skeptical of everybody's definition.
-
- -Ralph Johnson
-