Re: exceptions
| From: | David Costa | Date: | Tue, 08 Jun 2004 14:13:58 +0000 |
| Subject: | Re: exceptions | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30172@lists.php.net to get a copy of this message | ||
On Jun 8, 2004, at 3:52 PM, Hans Lellelid wrote:
David Costa wrote:Could be, if that is the case I apologize.This argument is always brought out anytime someone makes a critique of PEAR. I think you're missing the point.Bashing will not help your argument. It will actually make the likelyhood you get taking seriously smaller. Bashing PEAR might however make you more expected outside of PEAR (they are a fair amount of people who feel its necessary todo so).There will always be someone saying something like that about PEAR. I have read similar comments online yet I have seen few to say "let me help and let's improve X or Y". At the end of the day we have to please the users and to provide quality libraries. Pleasing every PHP developer it's really not the point on PEAR.
No one (at least not me) is criticizing PEAR on the whole. What I was/am criticizing is an attitude and policies, these are not things that could be addressed in a more "constructive" way by sitting down and writing documentation.. I don't think that sitting down and writing documentation is less constructive the arguing about the possible future rules but that's just me ;)
Let me rephrase my criticism in what is apparently the too-rarely-used "constructive" way: Let's improve PEAR's policy on Exceptions, because it's reactionary and will not be what people want in 6mo-1yr when PHP5 is everywhere. The current policy that exceptions are for replacing PEAR_ERROR_DIE might as well be a policy that says "don't use exceptiosn". This seems to be grounded in little real-world use, much speculation, and just a little bit of old-fashioned fear of change. Exceptions should replace any & every use of PEAR_Error [for PHP5-only packages, of course].I would disagree. I am writing a PHP 5 only package and I am using PEAR_Error in lieu of exceptions. I accept that a rule shouldn't limited your way of coding but this should be a two way deal. (this doesn't mean that I don't like standards. just that exceptions are hardly a standard in PHP code.)
Warnings may need to be handled by some construct, but errors are exceptions ... same thing. I care about this because I use PEAR classes & I'd like to see more PEAR tools become solutions for people doing PHP5 development. Also, I'm going to be creating some PHP5 versions of some PEAR packages. I'm doing this because without Exceptions these classes are useless to me in a PHP5 framework. Other OO things also get easier in PHP5. I'd be happy to contribute these back to PEAR, of course, though it seems from current discussion that these would be rather unwelcome.I don't think that they would be unwelcome. Every good package has good chances to become part of PEAR. Regards David Costa
Hans