-
keep allowing of sharing a variants across unions - why? why not?
- e.g. share None across all typed Optionals e.g. Optional, Optional, etc.
- downside is that variant is not unique for a union type
-
use two types of variants - tagged (with union) and untagged - why? why not?
- https://spin.atomicobject.com/2016/05/11/adts-monads-ruby/
- https://spin.atomicobject.com/2016/05/12/ruby-functional-programming-monads/
- https://github.com/nkpart/adt
- https://fsharpforfunandprofit.com/posts/discriminated-unions/
- https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/discriminated-unions
- https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/results
- https://blog.softwaremill.com/algebraic-data-types-in-four-languages-858788043d4e
- https://www.typescriptlang.org/docs/handbook/advanced-types.html#discriminated-unions
- http://2ality.com/2017/12/variants-reasonml.html
- http://patshaughnessy.net/2018/3/15/how-rust-implements-tagged-unions
- https://eli.thegreenplace.net/2018/go-and-algebraic-data-types/
- https://puppet.com/docs/puppet/5.3/lang_data_abstract.html
- https://docs.racket-lang.org/phc-adt-implementation/phc-adt_adtadt.html
- https://www.cs.cornell.edu/courses/cs3110/2019sp/textbook/data/algebraic_data_types.html