2021-03-27 15:30 GMT+01:00, Rowan Tommins :
> On 26/03/2021 22:58, Olle Härstedt wrote:
>> You can't catch the value of $temp in the match-case?
>>
>> $foo = $bar + match (doSomething()) {
>>$temp => $temp,
>>exception SomeException => 0
>> };
>
>
> $temp doesn't have an o
On 26/03/2021 22:58, Olle Härstedt wrote:
You can't catch the value of $temp in the match-case?
$foo = $bar + match (doSomething()) {
$temp => $temp,
exception SomeException => 0
};
$temp doesn't have an outside value, it was an inline assignment to
capture the value
2021-03-26 23:00 GMT+01:00, Rowan Tommins :
> On 26/03/2021 16:45, Olle Härstedt wrote:
>> 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-e
On 26/03/2021 16:45, Olle Härstedt wrote:
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/).
That's an interesting idea
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