chapel-lang / chapel

a Productive Parallel Programming Language
https://chapel-lang.org
Other
1.79k stars 421 forks source link

variant types #11453

Open mppf opened 6 years ago

mppf commented 6 years ago

It has been proposed that Chapel support variant types / something more like Rust enum / a more flexible tagged union.

See also the archived mailing list at https://sourceforge.net/p/chapel/mailman/message/33231178/ (and also "type select on unions": https://sourceforge.net/p/chapel/mailman/message/33156198/ )

Should Chapel support variant types? What would they look like?

Supporting variant types might well add them to enum and deprecate union entirely.

No matter what, unions need some improvement:

BryantLam commented 4 years ago

C/C++ FFI considerations for implementing tagged unions in Rust