No, not as in 5.4 will make you write stupid code. As in it will make all pre-5.4 attempts to maximize re-use through crazy inheritance chains look ridiculous compared to what traits will deliver.
I already have a sense of dread of being a year into PHP traits looking at not-too-old code; how painful it will be to look back at what kind of crap we put up with!
This is going to be awesome, and I for one, welcome our new trait supporting overlords.
Now .. WHERE ARE MY RETURN TYPE HINTS!
I recently had a discussion with a peer and we pretty much summarized what we wish the stance on types for PHP will become something like this:
PHP is a loosely typed language, as it matures in OOP, it must support more strict typing features (including generics: string, int, float, bool, etc). Emphasis on support, not enforce.
Those who want to leverage the dynamics of loosely typed programming can go for it, there’s a place for everyone here to do what they want.
It’s the hippy thing to do!
P.S.: Here’s a fun conjecture about the php.net domain name and a get-rich-quick scheme!
Leave a Reply