3 ms·
I would choose Rust over TS not for any performance characteristics, but because I strongly prefer it as a language, due in large part to features like pattern
by mplanchard 6y ago
I would choose Rust over TS not for any performance characteristics, but because I strongly prefer it as a language, due in large part to features like pattern matching, sum types, exhaustiveness checking, traits, etc.
I do quite like TS, but you can never really get away from the fact that you’re still limited by many historical JavaScript gotchas, and the type system is nowhere near as powerful as Rust’s.
Edit: That being said, as a business decision, TS will often be a better pick because it’s so much easier to find talent, and the learning curve is much smaller.
- chrfrasco 6y agoSum types and exhaustiveness checking are doable with typescript! Though it's not especially ergonomic https://www.typescriptlang.org/play?#code/C4TwDgpgBAygrgWygXigbygMwPbYFxTABOcEANFAEYCGRBAzsQJYB2A5lAL5QA+6WuApmoAbetE4AoSZjgsAxsCbYWWFgAp6iAvAQBKBs3bpJUKPQDuTYPIAWUTYgB0ObHpNmz86uMIkIeKaeZkQQwHBEqloITjREQV4+0MJiAQmeoeGRUADkACYQwnAiwDnpBUUlgcFmcqHUdtSUIhCO+kFSUjJyisqqdRANtk0t6gAeBCwQAG4QRAZQU7NEHoS2RNgWixBbAKJEG0TqAAbevizYwFDDLHkteQQAJGhjnMd6kpxAA https://www.typescriptlang.org/play?#code/C4TwDgpgBAygrgWygX...