Re: Obsoleting PEAR.php
| From: | Sterling Hughes | Date: | Thu, 15 May 2003 22:31:33 +0000 |
| Subject: | Re: Obsoleting PEAR.php | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16336@lists.php.net to get a copy of this message | ||
On Thu, 2003-05-15 at 19:51, Pierre-Alain Joye wrote:
> On 15 May 2003 18:17:43 -0400
> Sterling Hughes <sterling@bumblebury.com> wrote:
>
> > Hi,
> >
> > Well, ok, I guess I'm either starting a flamewar, or rehashing
> > something that's already been decided. Poo Tee Weet.
> >
> > One of my major problems with PEAR is the underlying framework.
> > Nearly every class in PEAR seems to extend from the PEAR base class,
> > when its really not required for most of them [1]. The end result of
> > this is*slower* code that is a part of the framework. I suggest that
> > for now we start removing the usage of the PEAR class from the large
> > majority of code in PEAR. This should speed up the code considerably
> > (no extra overhead).
>
> In most cases we should not extends PEAR directly (and require_ it).
> So I agree with you while not extends PEAR for useless reasons (I
> removed it from HTML_Javascript 2 weeks ago for the same reason).
> I usually include PEAR only for the Error class.
>
> Maybe a well view on the PEAR_Error system and how it can be used can
> help to make things cleaner (i.e does not extend PEAR just to have the
> errors methods ;). I point you on http://www.php-mag.net with a
> nice
> article from Alexander about Pear_Error.
>
Yep, the error system is a good usage for PEAR, and I'm not talking
about requiring it. The include doesn't concern me, it's extending PEAR
itself, that's unnecessary and used quite a bit.
The PEAR error handling scheme should be thrown out for PHP5, in favor
of Exceptions.
-Sterling
> My 2cts,
>
> pierre
--
"The three most dangerous things in the world are a programmer
with a soldering iron, a hardware type with a program patch and
a user with an idea."
- Unknown