Re: deep investigation of PHP_Callback

From: Date: Sun, 06 May 2007 01:26:44 +0000
Subject: Re: deep investigation of PHP_Callback
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-46623@lists.php.net to get a copy of this message
Travis Swicegood wrote:
Thanks for your apology, Greg. It's completely unnecessary, but appreciated. As noted by one of those who left comments, this is an extremely simple package and one that nearly any PHP coder could put together in very short order. My biggest concern is what would have happened had this package been proposed by someone new to the PEAR community and/or PHP in general? Anyone coming from an OO background would have seen this as an obviously useful package and just considered it an oversight that it wasn't already available. That person, who might have even learned a thing or two about PHP via code available from PEAR, would have been excited about the prospect of being able to contribute something back to the community. To have their contribution greeted by having it declared "useless" would have been dispiriting to say the least, and at worst might discouraged them from future contributions.
Harsh has it might have been to this kind of person, they might have also learned something in the process about how to think when you are developing PHP. That being said, I personally think that PHP_Callback can be quite useful in exactly the kind of case you describe: you have a callback that would frequently have to be checked prior to calling instead of at definition time. What Bertrand and Alexey were worried about was that this package would become the defacto standard for all callbacks implemented in PEAR, which would quickly add up to quite a lot of overhead. So the key things for me is to ensure that people realize when it makes sense to use this package and when it doesn't. This also ties in to the general informal guideline in PEAR that you do not put dependencies in order to save a minimal amount of code (let's but the number somewhere around 50 lines). This general guideline would probably prevent the worst of abuses of PHP_Callback. regards, Lukas

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