Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
imagin8or
· 7y ago · 0 comments
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.
Comments
[–]
partyboat1586
7y ago
I'll be using it in my JavaScript extensively. Very useful in languages with useless type systems.
[–]
gautam1168
7y ago
Are you sure you cannot handle this using conditional types in typescript?
[–]
marcus_holmes
7y ago
Any typed language can do this, not just Rust ;)