4 ms·
Can you clarify the distinction between "abstract" and "specific"? Is Scala's Try[A] "specific"?
by ttymck 5y ago
Can 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.