Re: [DISCUSSION] Class Constant Enums?
| From: | Larry Garfield | Date: | Fri, 16 Aug 2024 22:38:35 +0000 |
| Subject: | Re: [DISCUSSION] Class Constant Enums? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-125003@lists.php.net to get a copy of this message | ||
On Fri, Aug 16, 2024, at 1:31 PM, Arvids Godjuks wrote:
> Hello Larry,
> I feel obliged to remind about the 80/20 rule where the last 20% of
> progress ends up being 80% of all the work. And from the discussion
> it's already looking like there are some major questions and caveats
> and engine problems that are gonna rear their ugly heads. I'm more in
> favour starting with somewhat self-contained features and steadily work
> to expand on them as people put the effort into it. The same as was
> done with the type system. You can lay the proper foundation now, so
> it's not blocking future expansion, but I really do not think full
> embedded classes are gonna be a short endeavor - probably multiple
> years if not half a decade going by prior record on features of this
> size.
> --
>
> Arvīds Godjuks
> +371 26 851 664
> arvids.godjuks@gmail.com
> Telegram: @psihius https://t.me/psihius
To go off on this tangent for a bit...
There's a difficult balancing act to be had here. On the one hand, yes, design small and grow
as you get feedback makes sense. On the other hand, if you don't think through the whole plan,
those early steps could end up being blockers for expansion, not a benefit. The most obvious
example, readonly was billed as a building block toward aviz. It ended up making aviz harder, and
it not passing the first time around. It remains to be seen if first-class callables end up getting
in the way of full PFA in the future. The piecemeal way in which anonymous functions have been
added over time has led to a lot of rough edges, and made discussions about smoothing them over
harder (eg, the auto-closure-long-callable RFC).
When those first steps are effectively set in stone forever, rather than something you can adjust
based on future feedback, "YAGNI" becomes an actively harmful approach to system design.
--Larry Garfield