On Tue, Jun 25, 2013 at 3:50 PM, Stas Malyshev <smalys...@sugarcrm.com>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?".