Re: Objective-C Question
Re: Objective-C Question
- Subject: Re: Objective-C Question
- From: The Amazing Llama <email@hidden>
- Date: Fri, 19 Sep 2003 11:32:09 -0700
On Friday, September 19, 2003, at 10:59 AM, Lars Sonchocky-Helldorf
wrote:
Am Donnerstag, 18.09.03 um 22:34 Uhr schrieb Jeff Galyan:
Why should I care about categories?
Due to categories ObjC is ready for the latest programming technique
hype: aspect oriented programming:
http://dolphin.c.u-tokyo.ac.jp/~kazu0/aspectj/doc/primer/newcomers/
aop.html
Different aspects of one class could be implemented using a category
for each aspect.
While others struggle to get aop features in their language (see
http://eclipse.org/aspectj/ ) ObjC had those features ever before the
aop hype broke loose - hence the name "category" for it and not
"aspect". So this hype is an "old head" for 'Steppers and Cocoaists.
Sorry, but Categories don't address the same issues as Aspects do. You
can't write a Category that logs every function as it's called, for
instance. You can't write a Category that deals with more than one
class, even, or with anything but *one* *class*. Categories can't
handle basic types, and they can't handle methods directly.
Aspects, on the other hand, address Cross-Cutting Concerns, which by
definition affect more than one thing in your program, be they classes,
objects, instances, methods, access, whatever.
They're both great tools, and there is a little bit of overlap, but by
and large they are different tools.
Seth A. Roby The Amazing Llama < mail or AIM me at tallama at mac dot
com>
"Life is like an exploded clown. It's really funny until you figure out
what just happened."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.