Simberon Design Minute
 

Abstract Names

One common convention in object oriented development is to see abstract classes named with the word Abstract. For example, an AbstractStream might have subclasses of ReadStream, WriteStream or FileStream. I don't like this convention for a several reasons. First, the name of the superclass is one you'd like to use to refer to any of the subclasses. For example, it's nice to be able to say that a method takes a Stream as a parameter, not an AbstractStream. Second, the class name isn't intent revealing. Adding the word Abstract doesn't reveal any more intent but rather tries to communicate a different property of the class. Finally, an Abstract class may not always be abstract. It may later be possible to create concrete instances of it. Renaming the class later is a major headache. So, if you're naming an abstract class, just drop the word Abstract from the name.

Download