3 ms·
Eh. Very easy to model as a second return type on the function type. If your function type is polymorphic, it's just another type argument.
by barrkel 8y ago
Eh. Very easy to model as a second return type on the function type. If your function type is polymorphic, it's just another type argument.
- int_19h 8y agoYou also need union types. But yes, you can make it work (the original lambda proposal for Java tried to do that). Of course, once you push it to the point where it does, then it is practically indistinguishable from having a single return value that is a discriminated union.