On Thu, Jun 27, 2024 at 4:33 AM Michael Morris <tendo...@gmail.com> wrote:

> Hello all. This is a ramble of an idea that's managed to run around my
> head for a few days now. It isn't fully formed, but I've ran the thought
> experiment as far as I can on my own and want to share it with all of you.
>
> If you got this far, thank you. This overall idea to take one of the
> better things to happen to JavaScript in the last decade and incorporate it
> into PHP has been bothering me for awhile so I figured I'd share.  I don't
> know how much merit there is to this though.
>

I don't think PHP needs to take many if any lessons from JS to be honest.
JS evolved the way it did to solve its own set of problems, and likewise so
has PHP. I'm not really clear from reading the whole thing what problems
this loose bag of ideas is even intended to solve, really, but from what I
have gathered it seems to me more like what you want is a transpiler a la
Typescript and that this would achieve whatever you're trying to achieve.
Personal take, but if there's one thing I don't want for PHP it's to become
[any more] of a garbled mess of different styles and different ways of
achieving the same fundamental abstractions and results. Composer and PSR-4
have become de facto standards, they're very good standards, we've achieved
remarkable near unity in their adoption and whatever few inconveniences
remain through the application of those standards in certain cases are
minor trade-offs (not having multiple interfaces in the same file, etc.)

A JS-inspired subset of PHP within PHP, supported by invocation through new
keywords and handed off to a separate parser seems like it's asking for
trouble at every level from implementation to maintenance to userland to
dependency management...

Reply via email to