News for hackers. Stuff that matters.
Re:Making Wrong Code Look Wrong (2005) by imagin8or on Saturday November 09, 2019 @07:00AM (#21491011)
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.

Re:Making Wrong Code Look Wrong (2005) by partyboat1586 on Saturday November 09, 2019 @08:14AM (#21491318)
I'll be using it in my JavaScript extensively. Very useful in languages with useless type systems.
Re:Making Wrong Code Look Wrong (2005) by gautam1168 on Saturday November 09, 2019 @08:54AM (#21491540)
Are you sure you cannot handle this using conditional types in typescript?
Re:Making Wrong Code Look Wrong (2005) by marcus_holmes on Saturday November 09, 2019 @06:46PM (#21495340)
Any typed language can do this, not just Rust ;)