3 ms·
Can you provide an example. I just don't see it tbh. Especially since closures in java really don't work with checked exceptions at all. That's why vavr avoid
by Blackarea 2y ago
Can you provide an example. I just don't see it tbh.
Especially since closures in java really don't work with checked exceptions at all.
That's why vavr avoids it at all costs. Eg:
```java
assertEquals(
Vector.of(1, 3),
Vector.of(Some(1), None(), Some(3))
.filter(Option::isDefined)
.map(Option::get)
);
```
If `Option.get` was throwing a checked you'd always have to wrap it in try-catch. I understand that this is a break with the type system (meaning it is not strong typed Maybe/Option in that sense). But otherwise you'd be worse of than with stupid null checks IMO.