Youssef Shoaib [MOD]
08/08/2024, 9:43 PMThrowable inside of a Failure class, why not box every Result.success that happens to be a Throwable into some SuccessThrowable class, and thus non-Throwable success values and exception values can both stay unboxed. I expect that Throwable success values would be very rare, and thus this would rarely, if ever, cause issues. This kinda falls out of comparing Result<S> with an untagged union type S | Throwable and noticing that to make this a tagged union, it only suffices to differentiate S values that also happen to be Throwable.
Is there an issue with this design?ephemient
08/09/2024, 3:55 AMZach Klippenstein (he/him) [MOD]
08/09/2024, 5:19 PM