Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22743 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43914 invoked by uid 1010); 14 Apr 2006 00:28:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43898 invoked from network); 14 Apr 2006 00:28:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Apr 2006 00:28:17 -0000 X-Host-Fingerprint: 194.109.193.120 unknown Linux 2.5 (sometimes 2.4) (4) Received: from ([194.109.193.120:41064] helo=mx1.moulin.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 87/A3-19715-1ACEE344 for ; Thu, 13 Apr 2006 20:28:17 -0400 Received: from localhost (localhost [127.0.0.1]) by mx1.moulin.nl (Postfix) with ESMTP id 437E11788A0; Fri, 14 Apr 2006 02:28:14 +0200 (CEST) Received: from mx1.moulin.nl ([127.0.0.1]) by localhost (moulin [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15794-11; Fri, 14 Apr 2006 02:28:12 +0200 (CEST) Received: from [10.0.13.55] (ip129-15-211-87.adsl2.versatel.nl [87.211.15.129]) by mx1.moulin.nl (Postfix) with ESMTP id 9EFC7154D24; Fri, 14 Apr 2006 02:28:12 +0200 (CEST) Message-ID: <443EEC9B.3090405@iamjochem.com> Date: Fri, 14 Apr 2006 02:28:11 +0200 User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andi Gutmans Cc: PHP Internals References: <7.0.1.0.2.20060413154916.014b1d88@zend.com> In-Reply-To: <7.0.1.0.2.20060413154916.014b1d88@zend.com> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at moulin.nl Subject: Re: [PHP-DEV] Re: Unicode conversion exceptions and memory leaks From: jochem@iamjochem.com (Jochem Maas) 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.