3 ms·
The WordPress ecosystem is the one place we need this the most. Adding a plug-in to your wp instance is always a gamble because you know it's gonna break someth
by firefoxd 8y ago
The WordPress ecosystem is the one place we need this the most. Adding a plug-in to your wp instance is always a gamble because you know it's gonna break something else.
Kudos to the author for helping solve a real problem.
- jstewartmobile 8y agoNamespaces are more like a mitigation than a solution. The problem is tight-coupling. Until that is addressed, plugins will always be little fail-bombs.
- debacle 8y agoIt depends on the plugin. Some of these methods are just helper functions for template rendering. Loose coupling isn't going to contribute a ton there, but not polluting the global namespace is important regardless of coupling.
- jstewartmobile 8y agoWrite enough code, and you will know that "just" is a famous last word. An actor model approach where one failure doesn't compromise the entire chain would help, but that is hard.
- acobster 8y agoThere's more than one big problem with WordPress, and namespacing is one of them. It's way too common, even in some of the most popular plugins, to just toss plugins into the global namespace and prefix them with $your_plugin_abbrev_. I've had textbook cases of namespace collision take down sites on routine plugin updates before. The core design of WordPress relies on global state, e.g. the $post global. I agree that that's a huge issue. Unfortunately, that will never be fixed, because it's so central to the design that "refactoring" the WP core not to use global state would break almost every plugin and every theme, and would be a fundamentally different system.