It’s precious when Java developers start complaining about how complicated the type system is in Scala. After all, it wasn’t until Java 5 came out that developers working with a JVM were given the opportunity to stop pulling lazy Objects out of the collections API and subsequently casting them into their respective types. What’s worse, given the outrageous number of organizations living on Java 1.4.2, not to mention the lazy and unmotivated old guard who refuse to properly type their code, it’s not uncommon to find an enterprise development project where nobody’s even heard of a ‘for-each’ loop.
This is why it always seems so disingenuous when Java fanboys start complaining about Scala’s type system. “Oh, it’s too hard. Oh, it’s too complicated.” The fact is, it’s not. It’s only too complicated when you’re coming from a language like Java, which treats proper typing like a second-class citizen.
The other day, TheServerSide had the opportunity to speak with Josh Suereth (@jsuereth) the author of Scala In Depth, a Senior Software developer at Typesafe, and a man that is passionate about both the Java and Scala programming languages. Is the type system in Java too complicated? Josh sets the record straight.