objc: categories and posing
January 25 2004 12:53 PM

just read about two interesting features of objective c: categories and posing.

categories allow you to add new methods to an existing class.

posing lets a subclass "pose" as the superclass. you send a message to the subclass to tell it to pose as the superclass -- then any time you instantiate the superclass you end up with an instance of the subclass.

it will probably take a while for this to sink in but off the top of my head i could see all those StringUtil and DateUtil java classes everyone writes disappearing if java could do this.

Comments (0), Add Comment