|
|
|
|
|
by kaba0
1948 days ago
|
|
Hmm, when I first learnt Scala, I haven’t had too advanced FP knowledge, so I am yet to have first-hand experience with this sort of exception-handling and I’m yet to decide how good it is. Compared to Haskell, it is probably better in some way because you have the proper stacktrace; but it “feels” impure a bit..
In a way Java’s exceptions are already an Either type with the result type and the thrown Exception (with “auto-decomposition”, unless checked exceptions) —- is the advantages like manual management of when mapping/flatmapping happens worth it in your opinion?
Nonetheless thanks for the heads up, I might try out Scala again with the exception handling model you mentioned! |
|