You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a number of different approaches to making enums more extensible, e.g. extensible sum types, polymorphic variants, and union types. We should survey the landscape of ideas and find one that works best in the context of Rust.
Any concrete proposal should include details of the type system changes (including interaction with other type system features) and in-memory data representation.
Four years has passed and now Rust has reached 1.0 by long ago. Is there any possibility to discuss union types again? If RFC passed and possible, I'd like to work on the implementation.
Activity
reem commentedon Dec 15, 2014
My take 2 of the original RFC (#402) which addresses many of the issues of the original by stripping most crazy features and adding detailed memory representation and compilation strategy sections: https://github.com/reem/rfcs/blob/join-types/text/0000-join-types.md
Comments desired and very welcome.
xfoxfu commentedon Oct 14, 2018
Four years has passed and now Rust has reached 1.0 by long ago. Is there any possibility to discuss union types again? If RFC passed and possible, I'd like to work on the implementation.
jonas-schievink commentedon Feb 25, 2019
Status update: We have unions now!
(also see RFC 2008, which introduces the
#[non_exhaustive]attribute, also referred to as "extensible enums")fix: correct typo `inject as service` -> `inject` (rust-lang#409)