Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: OOP--What do you think? Message-ID: <51687@apple.Apple.COM> Date: 18 Apr 91 20:46:59 GMT References: <712@gate.oxy.edu> <14@fss.UUCP> <1991Apr17.231641.7125@cbnewse.att.com> Organization: Future Stuff, Apple Computer, Inc. Lines: 31 In article <1991Apr17.231641.7125@cbnewse.att.com> emuroga@cbnewse.att.com (eisuke.muroga) writes: > >In addition, I believe oop requires better design at the outset. It's hard >(and can really kill you) to start writing code on the fly. A bad design >can be more difficult to maintain than procedural code, so oop doesn't >necessarily mean the code will be easier to maintain. This is somewhat of a theoretical argument, because I think it is possible to do a good procedural design as easily as a bad OO design. In general, however, I disagree. If you're talking about a bad OO design then what often happens is that one class is too large (and should be broken up) or several classes could share behavior (and the class hierarchy should be rearranged). In either case, you clients of the classes should be isolated from their implementations, so changes to the class hierarchy should be relatively minor. A poor OO implementation would be one where clients are not isolated from the implementation. In that case, small changes to a class can cause problems. In both procedural and OO programming, you can't expect to write a large program on the fly. If you start an OO design by thinking about the fundamental objects in your program, then you will generally be on the right track. -- Larry Rosenstein, Apple Computer, Inc. lsr@apple.com (or AppleLink: Rosenstein1)