One of my fustrations in using Smalltalk is that I may have a subclass B with a number of subclasses, say C,D,E,F and such that some of the subclasses, say C and D, need to access an instance variable, say b, but the remainding classes, say E and F, do not need to access variable b. In this situation I have two basic options:
Would you mind stating a real world example of this scenario? I ask because I have the feeling the problem is more related to design of the class hierarchy than to anything wrong with Smalltalk. If E and F don't need all the instance variables of B, then they simply shouldn't subclass B.
Subclasses should only extend the behavior of a parent class, not restrict or change it, so I'm curious on seeing a real example of this issue.
Ramon Leon http://onsmalltalk.com