4 ms·
Yes, though the notation approach is worth following if you cannot use the type system (lang doesn't support it, or incurs unacceptable performance or complexit
by imagin8or 7y ago
Yes, though the notation approach is worth following if you cannot use the type system (lang doesn't support it, or incurs unacceptable performance or complexity overhead).
But yeah, zero cost compiler magic is the reason Rust is so good.
- partyboat1586 7y agoI'll be using it in my JavaScript extensively. Very useful in languages with useless type systems.
- gautam1168 7y agoAre you sure you cannot handle this using conditional types in typescript?
- marcus_holmes 7y agoAny typed language can do this, not just Rust ;)