Hacker News new | ask | show | jobs
by Twisol 1135 days ago
> Rust's use of typeclasses (which it calls traits for some reason)

Scala and (apparently) PHP call them traits too, among many others [1] -- Rust wasn't the first here.

[1] https://en.wikipedia.org/wiki/Trait_(computer_programming)

1 comments

The thing that Rust calls traits is quite different from the thing that Scala and PHP call traits, and much more like the thing that many languages call typeclasses.