You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For ExtCore v1.0 -- should we support both the Result<_,_> and Choice<_,_> type for error-handling, or should we drop Choice<_,_> and use only Result<_,_>?
Pros/cons of supporting Result<_,_> only:
👍 Smaller code size, less maintenance work (long-term)
👍 Just one way of doing things -- maybe simpler for less-experienced F# devs
👎 Result<_,_> is a struct, so doing a blanket replacement throughout code may hurt performance in cases where a Result is created wrapping a large struct and thereby induces expensive struct copies.
👎 Eliminating support for Choice<_,_> breaks backwards-compatibility with code written against current/past versions of ExtCore. Users of the library will have to to make non-trivial changes to their code in order to upgrade to ExtCore v1.0.
Pros/cons of supporting Result<_,_> and Choice<_,_>:
👍 Provides backwards-compatibility for code already written against current/past versions of ExtCore. Users should be able to (with the exception of the breaking changes defined in ExtCore v1.0 #47) simply upgrade to ExtCore v1.0 when it's released.
👍 Users can still choose between Result<_,_> and Choice<_,_> and use whatever best fits their needs.
👎 Adds additional complexity to ExtCore -- wherever we support error-handling within functions, we now need to implement those functions twice (once for Result, once for Choice). This is transitive as well -- any functions that call these functions also need to be implemented twice, etc.
For ExtCore v1.0 -- should we support both the
Result<_,_>andChoice<_,_>type for error-handling, or should we dropChoice<_,_>and use onlyResult<_,_>?Pros/cons of supporting
Result<_,_>only:Result<_,_>is a struct, so doing a blanket replacement throughout code may hurt performance in cases where aResultis created wrapping a large struct and thereby induces expensive struct copies.Choice<_,_>breaks backwards-compatibility with code written against current/past versions of ExtCore. Users of the library will have to to make non-trivial changes to their code in order to upgrade to ExtCore v1.0.Pros/cons of supporting
Result<_,_>andChoice<_,_>:Result<_,_>andChoice<_,_>and use whatever best fits their needs.Result, once forChoice). This is transitive as well -- any functions that call these functions also need to be implemented twice, etc.cc @vasily-kirichenko @7sharp9 @wallymathieu @dsyme @TIHan