Re: OOP Clarification
Re: OOP Clarification
- Subject: Re: OOP Clarification
- From: Bob Savage <email@hidden>
- Date: Tue, 01 Jan 2002 17:13:26 -0600
on 12/31/01 11:34 PM, Adam Eijdenberg wrote:
>
>
A class method ... isn't a true
>
"method" as such that it applies to an object, it's more like a
>
"function" in procedural programming.
>
This make me think of something: I created a wrapper class (OBJ-C) for the
CoreFoundation XML functions. I often found that the methods were really not
tied to any normal OO usage (they were really not working on their "own"
data in the sense that they were using iVars, rather everything was passed
in as an argument, even if the XML wrapper class was passing it in. This has
a lot to do with the extreme generality of XML processing, as opposed to
processing a specific XML-derived language. In my system sublasses of the
wrapper class added functionality for understanding how to deal with
documents in a particular XML-derived language. (You can look at the header
file here: <URL =
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/steamweasel/SWDevelopment/Ste
amWeaselClient/Source/Shared/SOX.h?rev=HEAD&content-type=text/vnd.viewcvs-ma
rkup>)
At any rate, the question becomes "Should I have made these extremely
generic functions CLASS methods, instead of INSTANCE methods?"
Bob Savage