Re: wacky object idea

From: Date: Mon, 28 Aug 2000 17:33:46 +0000
Subject: Re: wacky object idea
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.dev 
Request: Send a blank email to php-dev+get-30991@lists.php.net to get a copy of this message
Quoting Andi Gutmans <andi@zend.com>: > The problem isn't changing the convert_* functions. The problem is that not > only will we have to change some logic I am not sure if we will end up with > something consistent. I'm not saying it's not doable but things aren't > always as simple as they look. And in this case, before diving into code > and changing it, we have to seriously consider what we want, what the > implications are, what the limitations would be, and then finally if it's > feasible. What I want: An easy, short, and readable way to distinguish error values from valid return types. Maybe is_subclass_of isn't too bad - it doesn't seem as kludgy as it might. One way I thought of to do this was to allow objects to evaluate as false. Feasibility you or Zeev need to answer. > Operator overloading is one of the uglier features in C++. Java did things > better. Code is much more readable and maintainable when it uses interfaces > and not "object overloading". You might lose a lot of what PHP is about > when implementing this "cool" feature. You might move PHP coders into > writing unreadable code. This isn't operator overloading, as I understand it. We wouldn't be changing the meaning of || - we'd be changing the meaning of the object in the context of ||. -chuck -- Charles Hagenbuch, <chuck@horde.org> -- "Christmas is odd. What other time of year can you meet in front of a dead tree and eat candy from your socks?" - a crossword puzzle

« previous php.dev (#30991) next »