Hi all,
Finally caught up with this thread.
I can live with an exception being thrown for a type hint. I think calling
it InvalidArgumentException would make sense, and the fact that Marcus
"stole" :) that name for SPL and didn't prefix the name isn't a reason for
us not to do the right thing... As it would be an engine exception, we'd
move it to the Engine. This is a good reason why extensions such as SPL
should prefix their functionality.
As far as implementation is concerned, it definitely should wait for after
PHP 5.1 and the patch should deal with the hard parts which are internal
functions and overloaded functions. Implementing this for user-functions is
the easier part. There might be some gotchas (as usual) with internal
functions throwing exceptions.
On a whole though, I do recommend to relax on the
"add-every-oo-feature-that-exists" to the PHP code base, because it'll lead
to PHP loosing its ease-of-use. The namespace proposal (which I haven't
replied to yet) is a prime example. I saw all sorts of Java-like stuff like
private classes which in my opinion would just over-complicate our model
which already has become quite rich. We should only add what we really
think PHP users need, and not stuff which is nice because it's OOpier. I do
think that if we can get it right, a basic namespace model would be useful,
but it all depends wether we can avoid the problems we had in the past
*and* keep it simple!
Andi
P.S. - Derick, out of curiosity, what made you ask for an Exception? I
thought you don't use OOP, and definitely not evil try/catch constructs? :)
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php