List Info

Thread: Comment on PHP::PHP_Callback




Comment on PHP::PHP_Callback
user name
2007-05-06 04:17:07
Johannes Schlüter (http://pear.php.net
/user/johannes) has commented on the proposal for
PHP::PHP_Callback.

Comment:

Ok, I don't really care but I think one point was missed in
this whole
discussion: How often do you really need a general purpose
callback
mechanism?

In my experience my "callbacks" need to handle
specific parameters or
something like that. But these aren't checked by this
package. But there's
a technology in PHP which is quite good for this: It's
called "interfaces".
IN places I want to have a custom callback I expect a object
implementing a
specific interface and call a method on that.

In cases where you need a special purpose callback one
should also think
on the API usability - it's nice to think on developers of
PEAR classes but
I think it's way more important to think on the average user
using the
package. I think every PEAR user knows PHP callbacks (from
usort(),
preg_replace_callback(), ....) so using that should be
straight forward.
But using PHP_Callback the user first has to find out what
PHP_Callback is
and how to use it and as a user, not being interested in
implementation
details, this looks "strange".

Feel free to ignore my comment - I won't vote anyways 

Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=482


-- 
Sent by PEPr, the automatic proposal system at http://pear.php.net

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )