On Wed, Jul 1, 2026 at 6:23 PM Seifeddine Gmati <[email protected]> wrote:
> > I'm stopping right there. I've watched people make proclamations like > that, execute the code, crash servers costing thousands of dollars in > downtime and promptly get fired. > > It isn't a proclamation, it's checkable, and I linked the check. > `list($a, $b)`, `array($a, $b)`, and `[$a, $b]` compile to identical > opcodes: https://3v4l.org/rlQa6/vld#v > > The people who crashed servers weren't undone by verifiable > equivalences like this one; they ran transformations they hadn't > verified. This is the opposite: two forms the compiler cannot > distinguish. If you think that's wrong, open the link and show me > where the opcodes differ. > > And if the objection is specifically `ast-grep`, fair enough, it's a > general-purpose tool. But the migration doesn't depend on it. Mago > linter already implements exactly this rewrite, on a PHP-specific > parser, you can read the whole thing, it's about thirty lines: > > https://github.com/carthage-software/mago/blob/072933fda228a4c52d3858fd4b1797624aa31ac9/crates/linter/src/rule/consistency/array_style.rs#L101-L133 > > Mago is a full linter with over a hundred rules. If you'd rather have > something with zero config and zero surface area, I'll build you a > single-purpose binary that does only this one transformation. It's at > most 30 minutes of work. The point is that the rewrite is so > mechanically simple that the tooling is almost incidental. > > > You've never been in a position of authority to make a pragmatic > decision. No one with that burden would type what you've typed. > > You don't know what I do, so I'll set the personal framing aside and > give you the relevant part: I build static analyzers, linters, > compilers, and rewrite tooling for a living. So my ivory tower remark is on point. Most of the users of WordPress, myself included, do not have that level of skill. And while I'm doing better than most of my peers I'm still much closer to them than you and understand where they're coming from. They are, as a rule, adverse to change and prefer to use what they know works. And then there's the end users who can't code and install piles and piles of plugins to get their sites to work. Many of those plugins are abandon-ware and haven't seen updates in years. If they suddenly stop working there's going to be a lot of people confused and upset, and for what? The code reads prettier to you. More likely than not you are right about the ease of changing this over using a grep. That's not the problem. The problem is the disdain and indifference you've shown to people who's skills aren't up to par with yours. Being a better coder doesn't make you a better person.
