Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67240 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1673 invoked from network); 1 May 2013 08:46:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 May 2013 08:46:05 -0000 Authentication-Results: pb1.pair.com header.from=patrick.allaert@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.174 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 209.85.214.174 mail-ob0-f174.google.com Received: from [209.85.214.174] ([209.85.214.174:65237] helo=mail-ob0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/71-18873-B46D0815 for ; Wed, 01 May 2013 04:46:04 -0400 Received: by mail-ob0-f174.google.com with SMTP id wc20so1139526obb.19 for ; Wed, 01 May 2013 01:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=YotvUeKW9lGywZcKbcro8+JT6FO3lNFkEF5vGNHISl0=; b=G7njl8awd24mkXFI0hVXuiu9YxECi485gwB0DKdDgdQtnmGDdrTkJ4eXqUKR1mybm9 87ARVY1DnMozxcf0hpTE+8+cM0tyQ3irr0vDDoi5CcccE2bWIALuN8UElfVFVyZ06Rn2 AU+oy93Nlu/Mav1ETZu3iZwKeZRJfOH+h6w12pG0L99aL5m/M2vk+cb5poTnUOry3gdl MSxYhwx8oWhKlXi/B3atWy6H8SCLi3cmmQD0EysQPEdi9wZyKezFq0XXwm86MaYkcEUQ L8IvNckxz54vGYM+1POL9YW6Gp0aSqjdjmFkLjqEvFrBSRCK4youVEwZZ00vcnl7au1E XFsA== MIME-Version: 1.0 X-Received: by 10.60.56.199 with SMTP id c7mr463353oeq.8.1367397960897; Wed, 01 May 2013 01:46:00 -0700 (PDT) Sender: patrick.allaert@gmail.com Received: by 10.76.150.65 with HTTP; Wed, 1 May 2013 01:46:00 -0700 (PDT) In-Reply-To: References: <1367221266.2723.181.camel@guybrush> <517E9F47.4080100@sugarcrm.com> <51800539.7010807@sugarcrm.com> Date: Wed, 1 May 2013 10:46:00 +0200 X-Google-Sender-Auth: xVjmrBAF_5sz638xtu64ftCyOBE Message-ID: To: Pierre Joye Cc: Stas Malyshev , Amaury Bouchard , =?UTF-8?Q?Johannes_Schl=C3=BCter?= , Julien Pauli , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Continued try blocks From: patrickallaert@php.net (Patrick ALLAERT) 2013/4/30 Pierre Joye : > hi, > > On Tue, Apr 30, 2013 at 7:54 PM, Stas Malyshev wrote: > >>> You may have a lib/object/chunk of code which raises exceptions, because >>> its developer thought some error is not recoverable; but when you use >>> it, you don't want to break your program's execution. >> >> That's why you have try/catch. > > Exactly, I cannot agree more here. > > This proposal brings yet again exceptions for control flow, which is > really not what they are designed for (no matter the language, or > almost all languages). An exception can be handled and the program can > continue? Catch it, any other tricks bring control flow using > exception and that's really a bad idea. I'm quite opposed to changing try/catch flow with this additions for the same reasons that Stas and Pierre mentioned. Especially since this can perfectly be achieved without it and a few more ifs/whiles/gotos. There no need to have a gentle/nice-to-have syntax to handle the cases of libraries abusing exceptions. Cheers, Patrick