News for hackers. Stuff that matters.
Re:Python Type Hints – *args and **kwargs by dontlaugh on Monday August 28, 2023 @06:17AM (#37291964)
Traits as in the original Smalltalk research, Rust traits or Haskell type classes are like interfaces, but only when in scope. So until you import a trait, its implementation on various types isn’t visible.

This makes it possible to safely make a new trait and implement it on a built in type (like giving int a method) without the chance of another unrelated use of the type accidentally using what this trait provides.

There are no comments on this comment yet.