Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70551 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35039 invoked from network); 9 Dec 2013 15:34:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2013 15:34:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=pjsturgeon@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pjsturgeon@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.44 as permitted sender) X-PHP-List-Original-Sender: pjsturgeon@gmail.com X-Host-Fingerprint: 209.85.215.44 mail-la0-f44.google.com Received: from [209.85.215.44] ([209.85.215.44:54362] helo=mail-la0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/F0-28714-5F2E5A25 for ; Mon, 09 Dec 2013 10:34:14 -0500 Received: by mail-la0-f44.google.com with SMTP id ep20so1707676lab.17 for ; Mon, 09 Dec 2013 07:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=6WaMddAQOpuKV2+Gy6tC8oLTtXiKlSF4X93ttttIIuE=; b=BCZtutIA9omlq/4A32Y7WVsKgmGi1VeeLj4HFDKk9s5TmS33eQmWltJmXh3vdevg5F DpbaXe95C0ilYWp2MgdY4xME/DFtnh3oX5pGNDeVyA34Im8IHMUOdKdgpucLxvzIAcEW uXb2B1JzMnB+DNYNvfThB+vOZXA39BUmWRqC1IYA5jabb3gBfuqyab3ees2dcq8BCHfp fbACYMy03NRY5z/pBGKSaKrsDjWAWPCPg+K7SNYH57RobWIlx+xg4xx8zVqlcGmX1noI oKh4GedJbJxHttcyVtx7kWvjhDbtlsp4YgFyXCID309zwkxH6Xpms71Y1pVym9XvRti2 hgfQ== MIME-Version: 1.0 X-Received: by 10.152.116.46 with SMTP id jt14mr5653225lab.31.1386603249972; Mon, 09 Dec 2013 07:34:09 -0800 (PST) Received: by 10.114.64.131 with HTTP; Mon, 9 Dec 2013 07:34:09 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Dec 2013 10:34:09 -0500 Message-ID: To: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Fwd: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine From: pjsturgeon@gmail.com (Philip Sturgeon) On Sun, Dec 8, 2013 at 9:33 AM, Zeev Suraski wrote: > On Sun, Dec 8, 2013 at 4:18 PM, Nikita Popov wrote: >> >> Hi Zeev! >> >> I think this is a misunderstanding... I'm not suggesting to simply let the >> engine continue after an E_ERROR - as you pointed out, that would likely >> just crash it a few lines further down. >> >> This RFC is mainly a policy RFC: The goal is to allow the use of >> exceptions in the engine and to allow changing existing fatal errors to >> exceptions. The change from fatal errors to exceptions needs to happen >> manually, by adjusting the surrounding code to support continued execution >> (usually that means freeing resources + returning). A lot of fatal errors >> are easy to change, others are very hard or impossible. Changing fatal >> errors to exceptions rather than recoverable errors is both more useful to >> the end user and technically easier (as recoverable errors need to continue >> execution in the same codepath, which is often a lot harder to implement >> and find appropriate semantics for), which is why I'm suggesting this >> particular course of action. >> >> So, basically what I'm suggest is what you say in the last paragraph, just >> going directly to exceptions rather than converting to E_RECOVERABLE_ERROR >> :) >> >> Hope this is a bit clearer. >> > > OK, got you. Not using exceptions in the engine was also a design > decision (so that we don't force OO concepts on non-OO people) - need to > think if it still makes sense and get back to the vote. > > Thanks! > > Zeev I think it is fair to say there is a big difference between "forcing OO concepts on non-OO people" and which is what is being proposed here: "this is an object which you can use if you'd like to find out what is happening with this exception." No PHP developer is going to get away with not using any objects ever regardless of their preferred design approach, so offering them exception objects is not going to frighten anyone off. Or I missed your point. :)