On Sun, Dec 6, 2020, at 9:11 AM, Rowan Tommins wrote:

> Note that Larry's longer term plan is for "algebraic data types", 
> including "tagged unions": https://wiki.php.net/rfc/adts Unlike 
> straight-forward enum cases, these are not singletons, and each instance 
> has its own associated state.


I was going to respond, but I think Rowan summed it up here.  Stateful enums 
are called tagged unions, and that's a separate phase to keep the 
implementation and discussion focused for now.  We hope to add those in the 
future, but for now unit and scalar enums have a ton of value unto themselves.

--Larry Garfield

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to