DEV Community

Discussion on: Emulating TypeScript union types with ReasonML, part 2

Collapse
 
hoichi profile image
Sergey Samokhov

Funny how in this case TypeScript’s abstraction is zero-cost where Reason’s is not. No wonder, of course, since TS more closely matches the JS semantics.

Then again, a string representation of variant types is probably ever needed for interop only.

Collapse
 
yawaramin profile image
Yawar Amin

True, and for those we have other techniques.