Both Scala and Java are programming languages that target the JVM. Scala was originally invented with the intention to become a better Java yet eighteen years later many more developers write code in Java than Scala. What happened? In this blog, I cover the lessons learned by one technology company that chose to standardize backend microservice development on Scala instead of Java. Here you will learn about the various programming language features and patterns exclusive to Scala that give it an edge over Java. You will also learn about the difficulties that Java developers face when learning Scala. We will go over the differences between Scala and Java: the good, the bad, and the ugly.
The article itself will display at the bottom of this topic. Here are the references with links to online resources used in the making of this evaluation.
type of source | reference link |
---|---|
article below | Scala vs Java |
online dashboard | IEEE Spectrum Programming Language Ratings |
online dashboard | Google Trends |
official introduction | Case Classes |
official introduction | Match Expressions |
official introduction | Type Inference |
blog | Higher-kinded types: the difference between giving up, and moving forward |
overview | Cats |
blog | For-Comprehension Free Monads in Scala |
home page | Zio |
blog | Type Classes |
documentation | Akka Streams |
blog | Extension Methods |
home page | Circe |
blog | The Magnet Pattern |
source code | Mongo DB Java Driver |
book chapter | DSL |
blog | Scala Build Tool |
book chapter | Shapeless |
home page | What is Apache Spark? |
blog | Tagless Final |
blog | Cake Pattern |
blog | diamond dependency in multi-inheritance |
tutorial | Ruby Mixins |
online dashboard | Stack Overflow Trends |
official introduction | Scala Implicit Conversions |
blog | Lifting |
reference | Special Symbols |
source code | Scala on Scalatra |
source code | Java on Spring |
Having trouble viewing the embedded document? Feel free to download the PDF for offline viewing.
Here are some resources that I ran across after publishing this blog. Last year, Forbes published an article entitled Why Scala Is Seeing A Renewed Interest For Developing Enterprise Software which covers more historical context. Quite recently, Stack Overflow published their 2022 Developer Survey where the loved vs dreaded section for programming languages revealed that 50.3% of developers surveyed loved Scala while the remaining 49.7% dreaded it. By comparison 45.75% of developers surveyed loved Java while the remaining 54.25% dreaded it.