arrow icon indicating copy to clipboard operation
arrow copied to clipboard

Returning `Nothing` from shift instead of being polymorphic

Open nomisRev opened this issue 3 years ago • 1 comments

https://github.com/arrow-kt/arrow/pull/2797#discussion_r958247534

Also discussed on Slack: https://kotlinlang.slack.com/archives/C5UPMM0A0/p1661181942207909

nomisRev avatar Aug 31 '22 11:08 nomisRev

To me Nothing seems like the right type, to make them more like exceptions. In particular, the docs make this point, which I think is very relevant:

When you call this function, the compiler will know that the execution doesn't continue beyond the call.

serras avatar Aug 31 '22 15:08 serras

Closed by #2839

serras avatar Nov 17 '22 14:11 serras