From: David Hutto

> On Fri, Sep 24, 2010 at 4:09 AM, Gary <php-gene...@garydjones.name> wrote:
>> Daniel Kolbo wrote:
>>
>>> Say you have two classes: human and male.  Further, say male extends
>>> human.  Let's say you have a human object.  Then later you want to make
>>> that human object a male object.  This seems to be a pretty reasonable
>>> thing to request of our objects.
>>
>> I don't think any human can change gender without major surgery, but I
>> don't know if you just chose your example badly or whether you really
>> think objects should be able to mutate into other types of object
>> without some kind of special treatment.
> 
> But it would work in something like makehuman, where you start with a neuter
> form and scale one way or the other for physical features. If I
> remember correctly,
> we're' all xx until you become xy(genetically speaking).

This is one of the details that really bothers me about OOP. It makes it 
impossible to implement some very reasonable scenarios. 80% of the time, when a 
patron is added to a system, we don't know which gender they are. More than 50% 
of the time, we will never know, since the client doesn't keep track of it. But 
the rest of them will be assigned sometime after they were added. i.e. the 
gender assignment comes from a secondary source that is not available at the 
time the patron is entered.

Bob McConnell

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to