|
|
|
|
|
by vips7L
490 days ago
|
|
I genuinely disagree. There is no difference between a checked exception and a Result. - In concurrent programming uncaught exceptions won’t leave the future. Both values are available to you just like Results. I also don’t think arguments for concurrent programming are valid though. 99% of all code is single threaded. - It is checked. - Result infects the call stack as well. - handling the error case with a checked exception is also mandatory with handling the success case. There is no separate “execution regime”. What is the difference here: val a = try {
a();
} catch (b) {
onB();
}
val a = match (a()) {
Success(a) => a
Failure(b) => onB()
}
|
|