GADTs and Superpositions in Perl 6 – Aearnus’ Realm

GADTs and Superpositions in Perl 6 – Aearnus’ Realm

A junction is a special type that represents a superposition of eigenstates that collapse down to a single value in a boolean context. In English, it’s a type that is hand-crafted to match against values in special ways. For every runtime type check that occurs, must create an entire class for every constructor in the GADT.

Source: aearnus.github.io