Re: Mail_IMAP 2.0.0 alpha 1

From: Date: Tue, 06 Jul 2004 12:14:35 +0000
Subject: Re: Mail_IMAP 2.0.0 alpha 1
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31637@lists.php.net to get a copy of this message
On Jul 6, 2004, at 1:26 PM, Stephan Schmidt wrote:
Hi, David Costa wrote:
sure is a strong word ;)
Yes, and we better should be sure the the rules we define for PHP5 packages :)
If we are defining the rules then we cannot build upon the assumption that the users are too lazy to learn how to catch an Exception and therefore we have to use something else when there is an in-build mechanism to do this in PHP 5...
then they will have to make a genuine effort to understand how PHP 5 works if they intend to use PHP 5 packages.
Maybe they want a package that makes use of simpleXML or overloading and thus is only available for PHP5, but they never used exceptions. This will be a huge hurdle for them.
Why an hurdle? You will probably throw an exception in the case that e.g. they try to process a non existing XML file. So they will face an error message on the screen with the exceptions backtrace information, this in case they don't catch the exception.
Furthermore, when using a PHP4 and a PHP5 package in one application (while disabling E_STRICT, like 99.9% of all servers will probably have), you will have to deal with PEAR_Error and PEAR_Exception.
no because PHP 5 only PEAR packages must work under E_STRICT so you can't include PHP 4 stuff regardless if the end user is running under E_STRICT or not. So for the time being the only alternative is PEAR_Exception. I couldn't use ErrorStack or PEAR so I didn't even spend too much time in the transition ;)
IMHO ErrorStack will help us make a smoth transition from PEAR_Error to PEAR_Exception. Just my 2 cts.
I am just sharing my experience: I never used exceptions before and it looks pretty straightforward to me. I don't see a reason to make the transition longer then necessary but I do respect other views in this regard. I have no problem whatsoever with it. If some other developers want to use ErrorStack I don't have a problem with that. Klaus clarified that the ErrorStack will not be used in lieu of PEAR_Exception so this is fine by me. Cheers David Costa

« previous php.pear.dev (#31637) next »