by lkrubner · 11y ago · 0 comments
This seems like the worst of all worlds.
It isn't though. PHP is many things but overly verbose isn't one of them * . Although there does seem to be a drive by some developers to make PHP look and act as much like Java as possible. Maybe this comes from discomfort at PHP not being structured or strict enough out of the box for their liking. If you've only ever dealt with well-engineered languages which have a certain, coherent set of patterns and paradigms baked in, and which demand you write your code a certain way, and you approach PHP, you're going to have a problem.
I don't know why a tool like this would be useful, but it wouldn't be because of the language. PHP exposes its own token parser - you can generate PHP code with much less abstraction than this.
*classes like IteratorIterator aside...
Competition between frameworks and libraries ensures that there are multiple solutions to meet multiple needs, and also that consensus, where it exists, exists due to the popularity of a package, not the dictate of someone setting an arbitrary "standard" for the community. You can guarantee that Laravel is going to be updated because people use it and contribute to it, not because it's the only option.
And there's no guarantee that a single solution is going to keep backwards-compatibility. That is always entirely at the whim of the developer. Removing room to innovate only guarantees stagnation, it doesn't guarantee the standard.
Standardised, framework agnostic, go-to packages that are the de-facto solutions for specific problems