Category

From GNUstepWiki
Revision as of 09:44, 21 June 2006 by Cbv (talk | contribs) (Added to category Objective-C)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Categories let you extend the behaviour of a class without having to subclass it.

The obvious advantage is that all classes that inherit from the original class would automagically also inherit the additions of your category.

One disadvantage is that a category cannot add instance variables.