[PEPr] Comment on PHP::PHP_Callback
| From: | Bertrand Mansion | Date: | Fri, 04 May 2007 08:04:09 +0000 |
| Subject: | [PEPr] Comment on PHP::PHP_Callback | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-46598@lists.php.net to get a copy of this message | ||
Bertrand Mansion (http://pear.php.net/user/mansion) has commented on the proposal for
PHP::PHP_Callback.
Comment:
> Also, PHP cycles are easy to scale so keeping things lean and fast is
kind of a moot point. If this was a DB package I'd see your point.
Obviously, you don't know what you are talking about. It just takes common
sense to know beforehand this is going to be slow.
Without this package:
- 1 function call : call_user_func_(array)
With this package:
- Load the package
- Load PHP/Callback/Exception.php
- Load PEAR_Exception
- Parse all of them
- Call the constructor which itself calls a few other functions
- Call execute which itself calls a few other functions
> David: I'm all for allowing type hinting on normal data types. And I
don't think is a slippery slope. Arrays, objects and callbacks are complex
data types and deserver more attention than, say, string.
This is silly. Why do you use PHP in the first place? I suggest that you
look at other languages that were implemented this way: Python, Ruby, Java,
etc. If type hinting has to be globalized in PHP (it already exists, but I
understand what you mean even if that's not the correct term to describe
it...), it has to be done at the language level, not in PEAR.
Somebody already proposed a package that wrapped a PHP array in an object.
This was refused IIRC. I think the same happened to a String object.
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