Re: wacky object idea
| From: | Stig S. Bakken | Date: | Mon, 28 Aug 2000 22:33:34 +0000 |
| Subject: | Re: wacky object idea | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31019@lists.php.net to get a copy of this message | ||
Chuck Hagenbuch wrote:
>
> 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.
There's PEAR::isError() (doing is_subclass_of || get_class ==). It's
still sort-of long, but I think it's ok.
- Stig