Some functional languages have similar things, but it is rare
So I *think* associated types are only a rust thing, while polymorphic types are a more general programming concept. I could be wrong tho
-
-
-
Swift has them too. One thing they provide is what Haskell calls a "functional dependency". If a trait implementation is looked at as a function of types, the Self type is the input, and associated types are outputs. This lets type inference reliably infer assoc types from Self
- 1 more reply
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.