Path: utzoo!attcan!uunet!snorkelwacker!usc!zaphod.mps.ohio-state.edu!ncar!dinl!noren From: noren@dinl.uucp (Charles Noren) Newsgroups: comp.lang.c++ Subject: Re: Smalltalk-like classes Message-ID: <1735@dinl.mmc.UUCP> Date: 14 Sep 90 21:42:43 GMT References: <57379@microsoft.UUCP> <1990Sep13.011214.24799@cs.columbia.edu> <1990Sep13.061908.1032@kth.se> Reply-To: noren@dinl.UUCP (Charles Noren) Organization: Martin Marietta I&CS, Denver CO. Lines: 30 In article <1990Sep13.061908.1032@kth.se> d87-mra@dront.nada.kth.se (Magnus Ramstr|m) writes: ...a discussion from Steve Kearns on the value of a browser browsing classes... > >This is a good idea, providing that only the documentation and absolutely >not the implementation is copied. The subclass has no interest what so ever >in the implementation of superclass methods, only the interface. When >creating a subclass it is valuable to know what is already implemented. When >implementing new methods, there is no differance between messages it can >send to super and messages it can send to any object accessible from the >method. This is certainly the ideal, however there are many times when the documentation is inadequate. I have browsed the source code in class libraries in other languages and found it extremely valuable. It helps me pinpoint why my software didn't work (do to misunderstanding the documentation) and is a valuable aid in further learning the language and how the class library works. Looking at the implementation certainly violates a cardinal principle of encapsulation, but we don't live in an ideal world (or work enviroment) where there will be complete and perfect information of the interface. -- Chuck Noren NET: dinl!noren@ncar.ucar.edu US-MAIL: Martin Marietta I&CS, MS XL8058, P.O. Box 1260, Denver, CO 80201-1260 Phone: (303) 971-7930