franztesca
09/03/2022, 8:29 PMControlThrowable
(which is not a CancellationException
), in the PR with the inline fold the shift throws a ShiftCancellationException
, which is a CancellationException
... Therefore Arrow 2 is going to have a different behavior when interacting with the Kotlin coroutines, as stated here (and the conclusion of that was "It seems that continuing to use ControlThrowable
for shifting/short-circuiting is the best option."). Why have you chosen to use a CancellationException
instead of ControlThrowable
?
Question 2: It seems to me that the new solution (the inline fold and ShiftCancellationException
implementing the short circuit) is much simpler than the one implemented using continuations. Why did you choose the continuation approach in the first place and is there any drawback with the simpler throw/catch ShiftCancellationException
?
Thank you!simon.vergauwen
09/05/2022, 7:37 AM