WordPress source code is a mess. They should re-write it from scratch using modern technologies, or even a framework like Laravel.

That could as well just be a complete new product then, right?

It would definitely be a breaking change and unmigratable.

A few months back, Cloudflare used AI to make a Rust rewrite of WordPress, but I doubt that they would have found or corrected issues like this on the way? https://blog.cloudflare.com/emdash-wordpress/

TypeScript, not Rust.

Mullenweg will never allow WP to slip away from his control. "He wrote it" so you can't have it.

[deleted]

Who is they? automaticc?

Impossible. WordPress has had the PHP-group even considering writing new PHP features in a separate 7.4 branche and release them specifically for WP.