Re: Announcing RFC 'Anonymous Catches'
| From: | Anthony Ferrara | Date: | Mon, 24 Jun 2013 23:20:03 +0000 |
| Subject: | Re: Announcing RFC 'Anonymous Catches' | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67787@lists.php.net to get a copy of this message | ||
Joost,
First off, let me say welcome and thanks for the contribution!
I have a couple of questions around the intended proposal.
1. How do you plan on handling the case where there are multiple catch
blocks?
try {
code();
} catch {
doSomething();
} catch {
doSomethingElse();
}
2. You mention as a benefit "Better possibilities for static analysis
tools". Can you elaborate on this? I don't see how this sort of a change
would have any effect (as catch would be the same as the existing `catch
(\Exception $e)`)...
3. What benefit short of not having to type
(\Exception $e) would this
have? Populating the symbol table is extremely cheap at this stage, because
the variable is already compiled in (so no hash table lookup or anything).
Additionally, I would recommend changing the version target to 5.NEXT
(which would be 5.6 in practice).
As far as my personal feelings, I'd like to get some other commentary first.
Thanks again!!!
Anthony