On 30/12/2020 19:47, Larry Garfield wrote:
That's partially left over from when we had per-case methods, where grouping 
would be highly fugly.  However, I'm still advocating for tagged unions (in a 
future step) having per-case methods, and that would make the grouping syntax 
fugly again.  It's trivial to add later, so for now I think it's best to skip.  
If we find later on it doesn't get in the way of anything it's an easy addition.


Yes, that had occurred to me. Just to reiterate, though, the original justification read "it is unclear how common [cases without block definitions] will be in practice"; with the current implementation, we know for a fact that it will be extremely common - even if tagged unions use overlapping syntax that doesn't group nicely, every "unit enum" will have cases with no blocks.

Still, it's not a big deal either way, and as you say can easily be added later.

Regards,

--
Rowan Tommins
[IMSoP]

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

Reply via email to