Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87033 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92616 invoked from network); 5 Jul 2015 20:34:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jul 2015 20:34:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.179 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.179 mail-pd0-f179.google.com Received: from [209.85.192.179] ([209.85.192.179:35531] helo=mail-pd0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6D/B4-21549-BB499955 for ; Sun, 05 Jul 2015 16:34:05 -0400 Received: by pdbci14 with SMTP id ci14so93162209pdb.2 for ; Sun, 05 Jul 2015 13:34:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=icn+lKe3iWIl+Z+Jykrj4CGy5gScFqkMowf62XZ3Qlw=; b=qY/qh7geWgB2BpP8hxZ0/xZ1chFtVtzQmokory/RLjiayNcKWJwcSucUWDDicFPWf7 pXa51TXI533+IJeIfpc4guS7/rEbunA6YgfWVR0SAFFrGDMf7gS4vX69DWnxmbfwh4RI OipqqV7+RtYtGgCJB+hyvsBc9ONr6Y/nHDxINSfDG/YDCvGqYV7QU9qeSRavzoaiNpGT Wr5i9t5OhbR1okbLpNzEYCzBF4RDzWM2ZC4k+kIt1VQDVeIMzpOfMRl0uJ5v4ae8hQY3 1C+aGTJbFB3vsd1O01trLD4pMZe/QtTY4Atk+VahqTsyH7rEbARiabTCgXs5wSEXvTsX cLcA== X-Received: by 10.70.88.80 with SMTP id be16mr77633266pdb.37.1436128440083; Sun, 05 Jul 2015 13:34:00 -0700 (PDT) Received: from Stas-Air.local (108-66-6-48.lightspeed.sntcca.sbcglobal.net. [108.66.6.48]) by mx.google.com with ESMTPSA id xo3sm15721279pbb.74.2015.07.05.13.33.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Jul 2015 13:33:58 -0700 (PDT) Message-ID: <559994AB.3090102@gmail.com> Date: Sun, 05 Jul 2015 13:33:47 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Nikita Popov , =?UTF-8?B?Sm9oYW5uZXMgU2NobMO8dGU=?= =?UTF-8?B?cg==?= CC: PHP internals References: <1435240516.15676.7.camel@kuechenschabe> <1436127623.5633.4.camel@kuechenschabe> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Allow exceptions in __toString() From: smalyshev@gmail.com (Stanislav Malyshev) Hi! >>> I can see your concern here -- however this is nothing specific to >>> exceptions thrown from __toString(). There is are a number of ways you >>> can end up in this situation, the two most common being: >> >> I summarize this a bit freely as "We already have places which are hard >> to understand an predict, so let's add more!" >> > > That, or "Let's not be hypocrites". I don't think the position of "let's not add more unpredictable behavior to the engine" is adequately described as "hypocrite". We know there are interruption problems and such in the engine, we know some of them are hard to fix. However, adding a different class of those doesn't make it better in any way. If we find a solution that allows us to not introduce new unpredictable behaviors - I'm all for it, it's great. Maybe the code that allows to throw exceptions the same way we do with errors, maybe some way to not get unpredictable results on conversions. But we can't just ignore it because there are other problems in the engine too. -- Stas Malyshev smalyshev@gmail.com