*You* do the above because you know that you should; (hopefully you do
other checks as well). One of the things that we are doing is trying to help the
naive/lazy programmer who doesn't bother - or thinks that javascript checking
is enough :-(
What we want to do is to generate an error/warning
Please let me state that this is the greatest idea I read since the type
hinting discussion began (and the only one I personally like, as I find all the
other proposals really disappointing).
+1.
This contract system seems to be the best by far.
--
PHP Internals - PHP Runtime Development
-1 for 5.x
+1 for 6.0
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Etienne Kneuss wrote:
Finally, note that you can do that in userland using something looking like:
public function __call($name, $args) { return
call_user_func_array(array($this->$name, "__invoke"), $args); }
It seems like it'd make more sense to allow *all* functions to be called
using the 'nor