Why we choose Java instead of a polyglot stack
I agree that Java is the best programming language to write web services in right now.<p>But I have to admit that the most threatening counter-argument to using Java in 2016 is that Scala is, to all appearances, a strictly better language. It&#x27;s similar to Java and does everything Java does, but better- it has type inference, it does away with primitive types and arrays, it has compiler-checked string interpolation, it has declaration site variance, it has a richer collections library, powerful syntactic sugar, robust mechanisms for dealing with asynchronous programming... I could go on and on. And it&#x27;s deeply interoperable with Java so it should be a no-brainer to use it wherever possible.<p>Java&#x27;s saving grace in my opinion is, ironically given Java&#x27;s history, its culture. When you find that you need to use a small class from a library, you pray that it&#x27;s written in Java, because <i>most</i> of the time you can just go to its source in your IDE and see painstakingly detailed Javadoc describing exactly what each public method does and common pitfalls. And Java isn&#x27;t very expressive so all code looks the same- you just have to understand how the components interact with each other. If, on the other hand, the class is written in Scala, you&#x27;re vastly more likely to crash into a brick wall of undocumented one-liners that are complicated greatly by uses of the downright tricky bits of Scala&#x27;s type system. Using typesafe&#x27;s libraries (akka&#x2F;akka-stream&#x2F;slick) is an exercise in poking your code experimentally until it magically compiles, usually due to some random undocumented import. And scala culture&#x27;s love of DSLs and lifted types is downright hostile to ease of debugging. It&#x27;s hard to overstate how much of an impact these factors make throughout a workweek.<p>And yes, lots of Scala code is good and lots of Java code is bad. But I think the stereotype generally holds true.