Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67338 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72744 invoked from network); 7 May 2013 17:08:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 May 2013 17:08:28 -0000 Authentication-Results: pb1.pair.com header.from=seva.lapsha@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=seva.lapsha@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.177 as permitted sender) X-PHP-List-Original-Sender: seva.lapsha@gmail.com X-Host-Fingerprint: 209.85.215.177 mail-ea0-f177.google.com Received: from [209.85.215.177] ([209.85.215.177:60393] helo=mail-ea0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/00-06696-B0539815 for ; Tue, 07 May 2013 13:08:27 -0400 Received: by mail-ea0-f177.google.com with SMTP id o10so438908eaj.22 for ; Tue, 07 May 2013 10:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=lm4Fu12VrQKTCAjDBGs8lEJrvqbC/IdndAHmbT7GtUs=; b=kYtMW5/vlAe6hZfkv3nw6os0MzPegIleEwD1DxgtC9VwyMJ2sRz6oeB0vNXjme2+xv vFZsqUto+F23skuuycw1oSfWv8Bk/eEMZo9LWv2IyIetIDNdB4ctNjyrvbw3De/yjBCb Pky6KbpouBohXPYOuol8yvY6dV7XWHFQsNwCOi61fMteWvAaPaROCX2Arh0/M/E7pWrS qzA88oXm+vMqssyMTfzExzN65Irx35FeYZ/fWHcSedYJEDdQtM1gYJ4hRQovWosTvxIA nyxLz2Unf9wuGLdpFcp/AUpF0AaKXGcwu4WR1/Y+jGiA8/s51/rtNMPYhGUK2xQwicH2 kQlQ== MIME-Version: 1.0 X-Received: by 10.14.206.129 with SMTP id l1mr7187187eeo.30.1367946504789; Tue, 07 May 2013 10:08:24 -0700 (PDT) Received: by 10.14.143.13 with HTTP; Tue, 7 May 2013 10:08:24 -0700 (PDT) In-Reply-To: References: <1367221266.2723.181.camel@guybrush> <517E9F47.4080100@sugarcrm.com> <51800539.7010807@sugarcrm.com> Date: Tue, 7 May 2013 13:08:24 -0400 Message-ID: To: Patrick ALLAERT Cc: Pierre Joye , Stas Malyshev , Amaury Bouchard , =?ISO-8859-1?Q?Johannes_Schl=FCter?= , Julien Pauli , PHP Internals Content-Type: multipart/alternative; boundary=047d7b3a7fe67d938804dc23dd83 Subject: Re: [PHP-DEV] Continued try blocks From: seva.lapsha@gmail.com (Seva Lapsha) --047d7b3a7fe67d938804dc23dd83 Content-Type: text/plain; charset=ISO-8859-1 The feature exists in Python: http://stackoverflow.com/questions/574730/python-how-to-ignore-an-exception-and-proceed, in Ruby: http://stackoverflow.com/questions/5089802/which-is-the-shortest-way-to-silently-ignore-a-ruby-exception. Just saying. On Wed, May 1, 2013 at 4:46 AM, Patrick ALLAERT wrote: > 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 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --047d7b3a7fe67d938804dc23dd83--