Mixins can be as double-edged as operator overloading. Doesn't mean I don't love me some operator overloading in C# when the mood strikes, but neither are features that in anyway approach KISS principles nor are they essential.
As for everything else, PHP can hang. I actually particularly like their implementation of closures. I know people fretted about NS but that is all much ado about nothing. Millions of keystrokes wasted complaining about which single keystroke is used as a NS delimiter.
If you must do some PHP and you've come from Python, Ruby, Scala, etc, do check out the Flow3 framework. You'll feel closest to home.
None of those features are necessary (or even desirable) for building large scale software. Very few languages have that full set including C++, C, and Java.
First, C++ has MI (which can be used as mixins, although they also give you enough power to shoot yourself in the foot if you so choose) and namespaces. Namespaces and mixins are vital for building large scale software projects. C++ also allows generic programming (via templates).
Java has interfaces and namespaces. Both C++ and Java have static typing, which is a tool for building certain kinds of large scale software projects (dynamic typing -- combined with an actual type system -- as in Python, Ruby or Lisp -- is another tool).
Lastly, Java (as well as PHP) are garbage collector. C and C++ don't -- yet many large scale software projects were created without a garbagage collector. Does this mean that you don't gain a lot of power from a garbage collector?
C++ and Java are not examples of powerful programming languages either. You don't use them because they're the most powerful and elegant programming languages. Typically, they're used out of HR considerations ("it's easy to hire Java programmers"), performance requirements (C++ is fast; properly tuned JVM can be at most 10% behind C for applications which don't require a large heap) or libraries (although availability of other languages on the JVM overrules that argument as well in many cases).
Hate to be blunt, but you're speaking as a Blub Programmer. Sure, you can get things done in PHP (or in Java, or in C++) but there are languages out there with a greater amount of power that you willingly neglect. That's sad.
> C++ and Java are not examples of powerful programming languages either.
I never claimed they were, in fact I purposely lumped PHP in with them. I'm not ignoring other languages, but the these criticisms against PHP are entirely wrong. There are languages with a greater amount of cleverness, I agree. And yes, I probably would rather be programming in Python at this point. But PHP isn't bad because it lacks closures or mixins.
PHP is a blunt force language. You can get stuff done in it. It's success is based on low barrier to entry and easy deployment.
The problem with PHP is not one thing that it lacks. It's the complete lack of design in the language. Everything is tacked on, and the sum result is quite ugly. Certainly it's a usable tool, and you can build large scale systems with it, but there is no language that's as much of a mess except for Perl, and Perl at least is incredibly powerful.
Technically speaking, Java can have mixins as well if you include libraries that provide it. Stuff like Spring AOP uses aspectj under the covers and you can mimic mixin-like functionality in your classes with a few annotations here and there.
Technically, you could also provide mixins through the decorator pattern and interfaces. IntelliJ (and I am sure Eclipse) can generate this for me. However, that's less elegant and more fragile than using a language (e.g. Scala) which has Mixins as a language feature: IntelliJ can write code for me, but it can't read for me, nor can it explain it to other developers.
Likewise, I can use multiple inheritance in C++ exclusively only to mimic interfaces (as purely virtual classes) or Mixins (and in fact a lot of corporate style guidelines, e.g. Google's explicitly say that), but it isn't quite the same as having these as language features.
You can do closures, namespaces, mixins, etc in all of those languages (C++, C, Java). Some of them involve libraries, but the fact that people are engineering libraries to do those things means there is actually a need for those things in the enterprise community. I'd say C++ probably has all of those at the expense of uglier looking code. Java has a wealth of libraries that provide feature support for most of those too... I've done mixins & meta-programming at "enterprise level" jobs using Java before (Barclay's Bank), but the code is much more verbose and uglier than languages that support it natively.
My guess is that you haven't actually done enterprise-level jobs using those languages before, otherwise you probably would have seen many of those standard techniques used in the so-called "blub" languages of C, C++, and Java, even if the language didn't provide the feature natively.
Really? Namespaces aren't important for building large scale software? I'd argue that unless you are writing in C for a good reason, namespaces are absolutely a requirement for any-scale of software.
You can argue about closures and mixins, which are handy for people that know how to use them, but are not essential. But are you really going to argue against namespaces?
Ironically, the newer versions of PHP have most of those things, but most people who would care to use them left PHP years ago.
You can fake module naming with underscores (ugly but it works) and with duct typing you're only typing the full names of classes sparingly. In Java, the lack of namespaces would drive you insane, in PHP not so much. The lack of namespaces hasn't slowed down the development of very large class hierarchies in PHP -- just look at the Zend framework.
I'm not arguing against namespaces, I'm just saying for PHP they're more of a luxury than a necessity.
Not sure that you would want to use any of those three for large-scale development. C and C++ execute quickly at the expense of safety (bad for big apps), and Java is optimized mainly for ease of hiring programmers.
If you want to write clean, large-scale applications, you are going to need abstractions that those languages don't have. (Too bad CL never caught on, that would be perfect for what people use Java and C++ for...)
> If you want to write clean, large-scale applications, you are going to need abstractions that those languages don't have.
That's pretty much false given that nearly all large-scale applications are written in C and C++. Every operating system, every web browser, almost every type of server software, and most desktop software. You might not want to it (I prefer C# for desktop development) but it's possible. And most large-scale web software (Facebook, etc) is written in PHP. So perhaps all those developers know something that you do not.
All those features are just not necessary. They're nice to have, perhaps. You can shoot yourself in foot with them, also possible. But you can build really great and clean software without them. And you can certainly build a massive ball of mud with closures and mixins.
Yes I realize PHP has made strides in some of those areas, but its mostly too little too late.