4 ms·
Yes, but Haskells'/Scalas' Either is abstract while Rusts' Result is specific SFBAP (Sorry For Being A Pedant).
by scns 5y ago
Yes, but Haskells'/Scalas' Either is abstract while Rusts' Result is specific SFBAP (Sorry For Being A Pedant).
- ttymck 5y agoCan you clarify the distinction between "abstract" and "specific"? Is Scala's Try[A] "specific"?
- scns 5y agoSure. Result is specific, you get a value or an error. Either can be used the same way, but you don't have to. The convention is use Right for the value and Left for the error but you can use it in other ways too, eg Left for an Int and Right for a Float.