3 ms·
The draft there has a feature that the posted RFC does not. Associated types. Without the associated types you can't have the monadic style behavior which is wh
by zaphar 6y ago
The draft there has a feature that the posted RFC does not. Associated types. Without the associated types you can't have the monadic style behavior which is why I was similarly confused by that wording there. Associated types elevates this from "Oh look a C enum" to actually useful ADT's like in Rust or the ML family of languages. I wonder if the draft you linked will make it into the official rfc or not.
- tored 6y agoThere is meta RFC for enums https://wiki.php.net/rfc/adts https://wiki.php.net/rfc/adts That links to this rfc https://wiki.php.net/rfc/tagged_unions https://wiki.php.net/rfc/tagged_unions