Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67825 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96880 invoked from network); 25 Jun 2013 20:06:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jun 2013 20:06:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.181 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 74.125.82.181 mail-we0-f181.google.com Received: from [74.125.82.181] ([74.125.82.181:36430] helo=mail-we0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/B2-18197-158F9C15 for ; Tue, 25 Jun 2013 16:06:42 -0400 Received: by mail-we0-f181.google.com with SMTP id p58so9731632wes.12 for ; Tue, 25 Jun 2013 13:06:38 -0700 (PDT) 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 :cc:content-type; bh=B8dxnFmpX7l/dULQseVFrjSEZ9o39l4q8n815zcHNaU=; b=zy1C+k3SgP/uuI+kQy5sKyW7GQhZVmS2dIBBBFLRm2H92AMTC0g0MLYB08/q97d29v 5EckfWy7Po8N+poRIBh0jJ98iEJiYzyp9fshQ2nXF3c/e1Dc9b9oOGU/uL3phvLft6Xc EG5xR5P9FuKnqXF7Q/mUd+IHCio+AUNMKTtvzeWFIwlCWA0j+zu8kX2uN2WfDYWv8KD0 72Ryc9vi2aQw2qh1/dPiIReYBZczkhMhkhlDqSbAXlvg8FwRX2DguBEtB/YWcNmLzJHE bnUuPp5csxiPZRQ1LuklYT0Q3XML7rfGouMrXaEuv5Hs/Q/aCD7SpoDKLz0TzOHu8Se8 f57g== MIME-Version: 1.0 X-Received: by 10.180.37.133 with SMTP id y5mr455927wij.20.1372190798756; Tue, 25 Jun 2013 13:06:38 -0700 (PDT) Received: by 10.227.60.205 with HTTP; Tue, 25 Jun 2013 13:06:38 -0700 (PDT) In-Reply-To: <51C9F485.6050709@sugarcrm.com> References: <4ED7146272E04A47B986ED49E771E347BB4DF6F235@Ikarus.ameusgmbh.intern> <51C9DED2.5080401@sugarcrm.com> <51C9F485.6050709@sugarcrm.com> Date: Tue, 25 Jun 2013 16:06:38 -0400 Message-ID: To: Stas Malyshev Cc: Michael Wallner , Joost Koehoorn , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=e89a8f50335a1fc0e104e0001174 Subject: Re: [PHP-DEV] RE: Announcing RFC 'Anonymous Catches' From: theanomaly.is@gmail.com (Sherif Ramadan) --e89a8f50335a1fc0e104e0001174 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jun 25, 2013 at 3:50 PM, Stas Malyshev wrote: > Hi! > > > IMO actually it *makes* the code clearer, because $ignoredException is > > not used, though a variable name like $ignored 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 agree with it, but he is saying that this isn't a key-stroke saving proposition. If I'm to understand this RFC correctly, it is nothing more than a random suggestion someone posed in the form of a tweet and the author is saying why not add it since it's not hard to implement. So in summation this is one of those "nice to have" 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 "Let's make the variable optional because... why not?". --e89a8f50335a1fc0e104e0001174--