[NEWBIE]: Categories, etc vs subclassing
[NEWBIE]: Categories, etc vs subclassing
- Subject: [NEWBIE]: Categories, etc vs subclassing
- From: J Tichenor <email@hidden>
- Date: Wed, 20 Oct 2004 09:05:58 +0100
Just a quick question: a lot of time, on the list, the suggestion to
fix a particular problem includes subclassing some NS class. I
understand that subclassing is the most powerful way to extend a class,
but also understand from many design articles and books, that
subclassing should always come as the last step. Composition first,
then if possible use of delegation, categories and protocol extensions.
Then, if none of those will work, subclassing. But rarely on cocoa-dev
are those other methods suggested. Almost always subclassing is the
first way to go.
Just wondered if my readings were wrong, and the other methods of
extension are far more limited than implied, or if subclassing is just
so much a habit?
Hope this fits the cocoa list as it's more of a programming philosophy
question.
~j~
James Tichenor
VFX Supervisor
AIM: email@hidden
(07779) 256 103
http://www.lehopictures.com/the_joint/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden