Andi Gutmans wrote:
As you know, exceptions were designed to be user-land and not for internal functionality. I warned about that more exceptions were being integrated into the extensions; and I especially warned of ideas of integrating them into language constructs such as type hints and conversions. I don't have a good solution for this right now, except for adding a lot of bulk to C extensions and the core and making them overly complicated. Anyway, I'll discuss with Dmitry and see if he has any ideas I didn't think of.

re: this specific case. Is it really a good idea for a type conversion to throw an exception? People won't be expecting that from reading the code. They'd most likely only expect methods to throw exceptions...

I really enjoy using exceptions since their inclusion in php and the first
thing I thought was "ow, that going to make going 'unicode' _alot_ harder than
the transparent transition that was originally pitched to endusers", my second
thought was "didn't the big cheeses decide that the engine wouldn't
be throwing any exceptions?"

without being disrepectful to the tons of great work going into making
php(6?) unicode native I would suggest that from the point of view of the
'average' php coder Andi's concerns are spot on.

rgds,
Jochem.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to