Meanings of public abstract
←Older revision | Revision as of 07:10, 2 August 2013 | ||
Line 50: | Line 50: | ||
==== Meanings of '''public abstract''' ==== | ==== Meanings of '''public abstract''' ==== | ||
- | Methods marked as '''public abstract''' enforce every subclass to provide their implementation. There is no escape from this and as such this is the primary meaning of this pair of modifiers. | + | Methods marked as '''public abstract''' enforce every subclass to provide their implementation. There is no escape from this and as such this is the primary meaning of this pair of modifiers. Yet, the method is also '''public''' and as such it can be called by any user of the [[API]]. As such there is a second meaning of the method and needless to say that the [[clarity]] suffers. |
- | + | ||
- | Yet, the method is also '''public''' and as such it can be called by any user of the [[API]]. | + | |
Although not as bad as '''public''', still there shall be no place for double meaning '''public abstract''' methods in an [[API]], especially on objects that that every user of the [[API]] can get a reference to. | Although not as bad as '''public''', still there shall be no place for double meaning '''public abstract''' methods in an [[API]], especially on objects that that every user of the [[API]] can get a reference to. |