Quote:Original post by Daerax
Seeing as the thread is dead. Would you happen to know the history of the term? Why are they called algebraic types?
There is an algebra of types, with sum as choice (Either), product as pairing (,) and exponential as the function type (->). You'll be familiar with this from CCCs in category theory. Algebraic data types are sums-of-products.
This is useful because it allows you to do things like calculate when two types are isomorphic and calculate the derivative (as in calculus) of a type to obtain a Zipper.
Regular inductive types subsume sum so it is not built into ML, but product is. Coinductive types like Charity's subsume product, so tuples don't have to be built in either. In categorical semantics, an inductive data type is an initial algebra for an endofunctor and a coinductive type is a final coalgebra for an endofunctor.