If you have a set of "great" developpers and you force them to use a crappy toolset you are not an interresting company for them. They will simply resign.

It so quite possible the long term productivity will be better with the mediocre programmers team regardless of their tooling.

If you have a team of great programmers you also need to give them the possibility to do some interresting stuff.

And that's basically that, when the great programmer will come and ask to change tooling or improve you'll refuse. They'll understand you prevent them to do anything efficiantly and so they'll resign as they waste their time here.

But even with great tools at their disposal, a mediocre team of programmer will perform averagely.

Because you don't just need to have the tool lying around, you have to know how to use it, what is good, what is bad, when to do this or that. if there not somebody behind them to coatch them all the time, they will not leverage it.

When for example a person learn design patterns, they want to use them all the time.

The great developper know the patterns, understood the key concepts behind and know when to use and not use them.

As for the language it is more crutial than you think. It is basically the shared basic knowledge and discussion medium in your company. And your APis are also part of it. If you have high level concepts coming from both your API and programming language and your developper know them they'll think directly in theses high level concepts and will be able to ignore the irelevant details.

What make Java more efficiant mostly is that you can forget to think about freeing memory and it is almost impossible to get a core dump. Instead of having to learn and speak the concepts of allocating and freeing memory your developpers will be able to concentrate on other things.

And what make C more efficiant than assembly is that you can actually write easily functions, that you can define structures and that the compiler take care to compute the proper shift in memory to access the differents field and so on.

But java, especially before version 8 is lacking key concepts like basic functionnal programming. So when a developper want to filter a collection, a pretty common operation, he will just iterate, check the condition of the filtering and return a filtered collection. It will be very specific and the level of expressivity of this code will be quite low.

A great developper would at leas isolate that code into a function with meaningfull name or define a generic filter function and pass predicate as anonymous functions. But the lack of proper lambda expression will prevent to fully leverage it.

But once everybody is accustomed to functionnal programming they'll just use filter and a predicate. The intent is much more clear, almost self documenting.

The more expressive you can be, the more common knowledge you can have, and the more you can concentrate on issue key to your program and the less you can spend time on unecessary details, the more productivity you get.

And yes, this start with a good programming language with a good echosystem and a team that efficiant with it.

That's why Java or C/C++ are so often used: they are the easiest languages when you need to hire because more people know them. This doesn't mean they are the best language for your problem at hand.