Re:A new approach to error handling
by mrkeen on Tuesday July 30, 2024 @05:56PM
(#41114518)
Man I hope Vavr survives. It is an oasis of rationality and I'm disheartened that https://docs.vavr.io/ appears to be down. Its Set implementation actually has union and intersection (!!!)
Edit: Not sure why the downvote.
This works in Java today with proper pattern matching (I left out the complete name from the permit clause, it won’t compile as is):