Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67826 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98563 invoked from network); 25 Jun 2013 20:14:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jun 2013 20:14:44 -0000 Authentication-Results: pb1.pair.com header.from=joost.koehoorn@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=joost.koehoorn@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.175 as permitted sender) X-PHP-List-Original-Sender: joost.koehoorn@gmail.com X-Host-Fingerprint: 74.125.82.175 mail-we0-f175.google.com Received: from [74.125.82.175] ([74.125.82.175:39670] helo=mail-we0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/03-18197-33AF9C15 for ; Tue, 25 Jun 2013 16:14:43 -0400 Received: by mail-we0-f175.google.com with SMTP id t59so9779905wes.34 for ; Tue, 25 Jun 2013 13:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type:content-transfer-encoding; bh=YsNQUGQYvROTbTDUby72L+s7T3mAKdJUUr0FWm4SJ3I=; b=Fuu8LFtNuJlEpTDasEpUJFIfwHLZ9fLBnxSD78dl6BIK/0si5jW4zGBelPmEyCLamO e8GDUtTOzHV9jvUZa8vUPQA/ng4Tqa/szcqVR0zHhmn4GCbUYq0FqNyvK+dvxypcAjAL EiWIvw7e8jS6Ntq9YLFBeOFs2a/It9AeNsLycE4QG6c/KKqcGcYOtRx9QSIolDfG06dB +1SvwuCnoYNyHi/tOxl6oBlgy5NXyuTYLcgbLrOrGBu8pLULQ88SqbOC+U3VqfV1l3tG pMhrdC3ZqEoKmzeU/jC2TvxprfZ0QKaJvhILyTp0VPwti1+kOLUN0RohhGy1Vn5JCh1t PwdA== X-Received: by 10.194.80.134 with SMTP id r6mr388707wjx.88.1372191280309; Tue, 25 Jun 2013 13:14:40 -0700 (PDT) Received: from MacBook-Air-van-Joost-Koehoorn.local (178-85-180-81.dynamic.upc.nl. [178.85.180.81]) by mx.google.com with ESMTPSA id fs8sm6528482wib.0.2013.06.25.13.14.37 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Jun 2013 13:14:39 -0700 (PDT) Date: Tue, 25 Jun 2013 22:14:36 +0200 To: Sherif Ramadan , Stas Malyshev Cc: Michael Wallner , "=?UTF-8?Q?internals=40lists.php.net?=" Message-ID: In-Reply-To: References: <4ED7146272E04A47B986ED49E771E347BB4DF6F235@Ikarus.ameusgmbh.intern> <51C9DED2.5080401@sugarcrm.com> <51C9F485.6050709@sugarcrm.com> X-Mailer: Airmail Beta (183) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: =?UTF-8?Q?Re=3A_=5BPHP-DEV=5D_RE=3A_Announcing_RFC_'Anonymous_Catches'?= From: joost.koehoorn@gmail.com (Joost Koehoorn) On 25 juni 2013 at 22:06:40, Sherif Ramadan (theanomaly.is=40gmail.com) w= rote: On Tue, Jun 25, 2013 at 3:50 PM, Stas Malyshev=C2=A0=C2=A0wrote: Hi=21 > IMO actually it *makes* the code clearer, because =24ignoredException i= s > not used, though a variable name like =24ignored is self-explanatory, > too. It's not used by you - which btw is usually not a good idea - if you've got an exception, you usually should somehow react to it - at least log it or something, that's what the exceptions are for, if the situation does not require special handling it shouldn't be an exception. But it may be very useful for debugging, for example. Especially if somebody other than you looks at this code and tries to figure out what is going on. Removing vital information - like ability to see which exception was thrown - just to save 3 keystrokes - looks like a very misguided idea to = me. Not to down-play the importance of what you're saying, since I fully agre= e with it, but he is saying that this isn't a key-stroke saving propositi= on. If I'm to understand this R=46C correctly, it is nothing more than a rand= om suggestion someone posed in the form of a tweet and the author is sayi= ng why not add it since it's not hard to implement. So in summation this = is one of those =22nice to have=22 features that has little cost and very= little benefit. And I'm referring only to making the Exception variable = optional (not the anonymous catch -- I'm entirely opposed to that part). So this entire discussion can be summed up nicely with =22Let's make the = variable optional because... why not=3F=22. Correct. The tweet was actually a serious request and grounded (see=C2=A0= http://news.php.net/php.webmaster/16092 as an earlier response to you). S= o the reason to make it optional is not really =22why not=3F=22, there is= some reasoning behind it.