« first day (2607 days earlier)      last day (2326 days later) » 

6:10 AM
wow putting final on classes in wordpress community is like a decease which requires medical intervention. While I can understand, while I do not agree, why it is on WP_Post, on most other classes it is just ridiculous.
 
 
9 hours later…
3:37 PM
Because subclassing WP_Post can cause allsorts of issues the core devs would rather avoid
Is there a particular reason you're trying to replace core classes and objects with children and imposters?
 
4:34 PM
the problem is not the final keyword on the classes, it's the lack of interfaces and a proper type hinting
 
4:51 PM
lol @fuxia, I meant to write that this is what you will say
@TomJNowell subclassing might cause all kind of issues because someone was too smart and decided that metas are properties. This goes against any reasonable OOP design and should have not done at all.
the funny thing is that I do not think I ever saw a code that actually use meta that way
 
the whole argument that someone could write code that changes the applications behavior is … foul anyway, to put it mildly. :)
 
totally agree
just force me to go and fork wordpress if I realy need it
got to the whole thing (again) because I want to see if there might be a way to extend the taxonomy class in a way that it will load translation only at actual out put, and then discovered that all classes are final, not only the post
and that even yoast and query monitor has their classes final
 
 
2 hours later…
7:16 PM
Final class + interfaces is a godsend for proper OOP that is based on composition and not inheritance. The problem is that WP is not OOP and classes are used as poor-men namespaces.
If you want to work with WP using OOP than you need to write your tiny facade layer that interacts with WP and offers an OOP interface to your code.
This is worth the trouble only for complex plugins, or if you work on a whole website where you can share the facade layer across all plugins you'll write for the website.
 

« first day (2607 days earlier)      last day (2326 days later) »