# Search results for "Tagged Unions (Enums)"

9 results, page 1 of 1. Each result is an email: results with the same thread number are in the same thread. The link opens the thread as Markdown, find the email in it by its number.

More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

1. [[RFC] Enumerations, Round 2](https://externals.io/message/112680.md) — email #112680 in thread #112626, by Larry Garfield on 2020-12-30
   > … singleton/multiton patterns using **enums**, like in Java. I'm not sure what you're describing here. Do you mean **tagged** **unions**/ADTs, which are punted to a later RFC? https://wiki.php.net/rfc/**tagged**_**unions** **Enums** evolve in …
2. [[RFC] Enumerations](https://externals.io/message/112448.md) — email #112448 in thread #112417, by Paul Crovella on 2020-12-07
   > … it up here. That's disappointing as he didn't even attempt to address the majority of my concerns. Stateful **enums** are called **tagged** **unions**, and that's a separate phase to keep the implementation and discussion focused for now …
3. [[IDEA] allow extending enum](https://externals.io/message/119805.md) — email #119805 in thread #119771, by Ilija Tovilo on 2023-03-30
   > … is) makes this quite confusing, and difficult to implement technically (usually classes are "locked" after linking). I would much prefer the previously suggested approaches (using algebraic data types, a.k.a. **tagged** **unions**, or union types of two **enums**). Ilija
4. [RFC Karma request: Enums with Associated Values for cases](https://externals.io/message/130007.md) — email #130007 in thread #130007, by Larry Garfield on 2026-02-04
   > … Regards, Jordi Please be aware that there are already plans for this feature (RFC is a bit dated for now so don't take literally): https://wiki.php.net/rfc/**tagged**_**unions** Which is currently blocked pending pattern matching, curren
5. [[RFC] [Discussion] Add get_declared_enums() function](https://externals.io/message/125731.md) — email #125731 in thread #125719, by Larry Garfield on 2024-10-02
   > … enum with one case; and we can't have this in PHP. That is what we mean by ADTs or **Tagged** **Unions** (various names for the same thing), and it's something Ilija and I have on the roadmap. It …
6. [String enums & __toString()](https://externals.io/message/125004.md) — email #125004 in thread #124991, by Larry Garfield on 2024-08-16
   > … any other. Making them usable as 95% strings partially defeats their purpose. We still intend to add associated values to **enums** at some point (aka ADTs, aka **tagged** **unions**), and... we're not really sure yet if that will impact …
7. [Any reason why backed enums are limited to int and string only?](https://externals.io/message/113886.md) — email #113886 in thread #113883, by olleharstedt@gmail.com on 2021-03-31
   > … forth. As for Result, what you'd want here is a dynamic, arbitrary value for both Ok and Error, which is exactly what ADTs / **tagged** **unions** would allow you to do: https://wiki.php.net/rfc/**tagged**_**unions** enum Res
8. [[RFC] Deprecate Invalid Filter Options](https://externals.io/message/132852.md) — email #132852 in thread #132778, by tim@bastelstu.be on 2026-10-09
   > … options field. I believe that introducing **enums** right now is not doing enough to meaningfully improve the developer experience. As an example, if we already had **Tagged** **Unions** (https://wiki.php.net/rfc/**tagged**_**unions**), the per-filter options cou
9. [Enum + property hook getter](https://externals.io/message/126358.md) — email #126358 in thread #126332, by Marc Bennewitz on 2025-02-09
   > … actually support properties and semantics might need to be different than those a naive “rushed” implementation of property hooks for **enums** would propose. See https://wiki.php.net/rfc/**tagged**_**unions** for an very early draft (which is not in …
