|
|
|
|
|
by lmm
1135 days ago
|
|
Yep. You've got to remember that Java is nearly 30 years old; at the time making a distinction between interfaces and abstract classes was seen as a radical move. Newer languages have better support for more decoupled ways of doing things, e.g. Rust's use of typeclasses (which it calls traits for some reason) or Kotlin's built-in support for delegation. |
|
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)