[2] Programming languages with support for type families or similar features include Haskell (with a common language extension),[3] Standard ML (through its module system),[4] Rust,[5] Scala (under the name "abstract types"),[6] and C++ (through use of typedefs in templates).
[7] Data families, on the other hand, restrict the codomain by requiring each instance to define a new type constructor for the function's result.
Typical use cases include describing abstract data types like generic collections, or design patterns like model–view–controller.
With these definitions, when a client refers to an Array (Int, Bool), an implementation is automatically selected using the defined instances.
The main advantages of functional dependencies over type families are in their added flexibility in handling a few unusual cases.