Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!cunixf.cc.columbia.edu!cs.columbia.edu!kearns From: kearns@cs.columbia.edu (Steve Kearns) Newsgroups: comp.lang.c++ Subject: Smalltalk-like classes Message-ID: <1990Sep13.011214.24799@cs.columbia.edu> Date: 13 Sep 90 01:12:14 GMT References: <57379@microsoft.UUCP> Reply-To: kearns@cs.columbia.edu (Steve Kearns) Followup-To: comp.lang.c++ Organization: Columbia University Department of Computer Science Lines: 24 One of the biggest pains of smalltalk-like classes is that to understand one class may require scanning four or five classes (the inherited ones). This is neccessary to find out all the functions and variables that make up a derived object. This goes against one of the fundamental principles of object oriented programming: a class encapsulates all the functions and data that comprise an object. One solution is to copy the inherited information into the derived class, prefixing the inherited items with the keyword "inherited". This is not really a viable solution, however, since an edit of the super class might require edits in all derived classes. A better solution seems to be the following: soon we will all be using nifty class browsers. I would suggest that these class browsers automatically copy the inherited items (and their documentation, please) into the subclass with the inherited keyword, or else in italics, or prefixed with the superclass name. The benefit of all this, I repeat, is that one would have to look at exactly 1 class to understand 1 class. -steve