4 ms·
It strikes me that several of the languages that gained popularity at the turn of the century are having a bit of an identity crisis in the face of their increa
by nicktelford 14y ago
It strikes me that several of the languages that gained popularity at the turn of the century are having a bit of an identity crisis in the face of their increasing irrelevance. This is especially evident in PHP, but I'm beginning to feel the same about Java in the face of JDK8.
With the new breed of popular languages (Ruby, Python, Scala, Clojure etc.) heavily influenced by functional programming, it seems as if the incumbents are desperate to remain relevant by adding comparable features with little consideration for their impact on the language as a whole.
For me, PHP has become (quite some time ago actually) a "kitchen sink" of a language; if another language has it, it's a fair bet that PHP will try to add it at some point in the future.
- skrebbel 14y ago> For me, PHP has become (quite some time ago actually) a "kitchen sink" of a language; if another language has it, it's a fair bet that PHP will try to add it at some point in the future. But is that a problem? I've not seen the fancy new features that PHP added in the last years clash with one another yet. The only con might be that PHP has become a relatively "big" language. Closures (but weirdly done), references, 2 styles of classes, object literals, namespaces, half-assed reflection with support for magic comments, constants that are slower than variables, some magic functions and methods here and there, half of which have lecacy history. That's a fair lot to take in at once. But once you've taken it in, it simply allows you to write better PHP code, more productively, than 4 years ago. How can that be bad?
- mgkimsal 14y agoI think it can be bad not for yourself, but when you have to start dealing with other peoples' code. There's little consensus on 'best practices' for some of the newer features, so it's likely you'll end up having to maintain someone else's code who started using new features (closures, for example) without really understanding how they worked, or how they could best be used. "goto" in PHP is another example of this. I've heard from many people "well, just don't use it!" but... 6 months from now, I'll be handed a codebase that is replete with goto and other stuff that not only do I not use, but the original author didn't really know how to use either. Adding more features adds more stuff we all have to be aware of, whether or not you use it.
- wheaties 14y agoI worked for several years as a C++ developer. Let me tell you that a "kitchen sink" language is a problem. You have to choose a subset to work in, there's lots of corner cases, and moving from one shop to another will turn you quickly into a language lawyer rather than a programmer.
- nicktelford 14y agoThank you for this; C++ is exactly the language that I should have referenced. It's a for-bearer for what PHP is to become.