core-lang / core

The Core Programming Language
https://core-lang.dev
MIT License
45 stars 1 forks source link

compact encoding of union variants #87

Open soc opened 1 year ago

soc commented 1 year ago

Make unions more space-efficient after https://github.com/core-lang/core/issues/8 is implemented, ideally avoiding the need for additional space to store bits that denote the variant of a union value.

For class-based unions:

For value-based unions:

For mixed unions: