News for hackers. Stuff that matters.
Re:Are dynamic languages going to replace static languages? ... by 4ad on Wednesday August 04, 2021 @05:08AM (#28058837)
Rust traits are not subtyping, Rust's type system is principal (although with subtyping you could achieve the same thing as described by the OP, e.g. in C++, C#, etc, which only have subtyping but no existentials exposed as a syntactic feature).
Re:Are dynamic languages going to replace static languages? ... by lmm on Wednesday August 04, 2021 @09:12PM (#28068546)
The only reason trait objects aren't subtyping is that impl trait is not a first class type in Rust. They behave like subtyping in this context.