Open uncomputable opened 7 months ago
We should use the term "structural types" which is a standard term for types which are defined (solely) by their structure.
That wiki page suggests the term "nominative types" for types which have names/explicit declarations, which I hadn't heard before but which I like.
TL;DR
"Base type" is a generic name that might be confusing.
Details
The Simfony type system comes with "fundamental" types: unit
()
, sumEither<A, B>
and product(A, B)
.Other Simfony types are defined as "macros":
Option<A>
=Either<(), A>
,bool
=Either<(), ()>
, ...At the moment, the Simfony type system expands all macros and works at the "fundamental" type level.
We want to pick a name for "fundamental" types that distinguishes them from "macro" types. Currently the former are called "base types".
Alternatively, we could enforce explicit casting between types. On the surface, this would make all types disjoint. Types with equal structure (
Option<A>
↔Either<(), A>
etc.) would be available for casting.