Abstract type: Difference between revisions

Line 2,944:
</lang>
=={{header|Smalltalk}}==
A class is declared abtract by responding to the query <tt>isAbstract</tt> with true, and defining the required protocol for subclasses to raise an error notification. Optionally, instance creation can be blocked (but seldom done, as you will hit a subclassResponsibility anyway soon). Typically, the IDE provides a menu functionfunctions to generate these definitions automatically (eg. "Insert Abstract Class" in the refactoring submenu of the class browser):
<lang smalltalk>someClass class >> isAbstract
^ true
Anonymous user