>For me "abstract class" is merely a definition/description of usage: don't base an object on this class. In different languages there is more or less need for such consturcts: I see abstract classes really close to the definition of interfaces<g>.
Close, yes.
To be picky, the wikipedia article about template methods has a java example of an abstract game class (
http://en.wikipedia.org/wiki/Template_method), which has abstract empty methods and one template method. Interfaces are mainly about seperation of definition and implementation. So an interface is more likely a special case of an abstract class then the other way around.
Abstract classes can contain code and perhaps also should do so. On the way from Game to Chess you might have several class levels in between that implement common code you can use for several chess variants. They're just no concrete games already.
Dont base an object on this class is really what
IF isabstract(This,This.class)
debugout "instanciation of abstract class "+This.class
error "instanciation of abstract class "+This.class+" is not allowed"
Return .F.
endif
is about. Whatever that isabstract() function would check.
Bye, Olaf.