alshdavid / BorrowScript

TypeScript with a Borrow Checker. Multi-threaded, Tiny binaries. No GC. Easy to write.
1.45k stars 16 forks source link

Union types #29

Closed Isaac-Leonard closed 2 years ago

Isaac-Leonard commented 3 years ago

Do you plan to support union types or only Enums?

SuperSonicHub1 commented 3 years ago

TypeScript and Rust support unions and enums, so I don't see why BorrowScript wouldn't.

Isaac-Leonard commented 3 years ago

Does rust support discriminated unions like typescript? My rust experience is limited to the earlier bits of the tutorial and extra stuff I've picked up reading about it online. Would the fact that borrowScript is compiled limit the effectiveness / capabilities of union types?

alshdavid commented 2 years ago

Agreed

TypeScript and Rust support unions and enums, so I don't see why BorrowScript wouldn't.