Unification

Noun · Development

Definitions

  1. An algorithm that finds a substitution making two type expressions identical. Core to type inference in Hindley-Milner systems and logic programming (Prolog). If unification fails, you get a type error.

    In plain English: The process a compiler uses to figure out if two types can be made to match, like solving an equation to discover what type a variable must be.

    Example: "The compiler uses unification to figure out that both branches of the if-else return the same type."

Related Terms