Hi,

Someone mentioned that they prefer lambdas over try-catch blocks,
which surprised me, since try-catch is completely idiomatic in both
PHP and OCaml (Haskell I don't know). That made me think of a recent
extension to OCaml which makes it possible to catch exceptions in a
match-expressions (here's one blog post about it:
https://blog.janestreet.com/pattern-matching-and-exception-handling-unite/).

Now when PHP also has `match`, are there any plans to extend it with
exception catching? So far I did not find anything about exceptions in
the match RFC v2: https://wiki.php.net/rfc/match_expression_v2

Kind regards
Olle

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to