First Draft: Callback For Matching Type
Dom DiSc
dominikus at scherkl.de
Thu Jun 27 07:59:37 UTC 2024
On Wednesday, 26 June 2024 at 17:14:24 UTC, Quirin Schroll wrote:
> I now have implemented a `SumType` that is commutative,
> associative, and idempotent, that is:
> * the order of types does not matter: `SumType!(T, U)` is the
> same as `SumType!(U, T)`,
> * they auto-inline like alias sequences: `SumType!(Ts,
> SumType!Us, SumType!Vs)` is the same as `SumType!(Ts, Us, Vs)`,
> and
> * duplicates don’t matter: `SumType!(T, T, Ts)` is `SumType!(T,
> Ts)`.
This is so cool.
I was always sceptical about the usefulness of sumtypes, but with
these properties I actual like it.
More information about the dip.development
mailing list