Re: Re: Unicode conversion exceptions and memory leaks
| From: | Jochem Maas | Date: | Fri, 14 Apr 2006 00:28:11 +0000 |
| Subject: | Re: Re: Unicode conversion exceptions and memory leaks | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-22743@lists.php.net to get a copy of this message | ||
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.