Scala, short for Scalable Language, is a general purpose programming language that is both object oriented and functional. It is designed to help programmers write code that is simple, sophisticated, and type safe, while staying productive.
Scala is a relatively young language, first released in 2004, but it has built a strong and active community, largely because it is considered one of the more approachable languages once you already know some Java. Scala draws influence from Java, Haskell, and Lisp, among others, and Scala source files use the .scala or .sc extension. You can build web applications, enterprise systems, mobile apps, and desktop software with it.
Below is a simple Scala program, along with the output it produces once compiled and run.
Input

Output

Scala has a fairly light set of prerequisites. If you already know some C or C plus plus, you can get started without much trouble. Since Scala is built on top of Java, and its basic program structure closely follows Java’s, a working knowledge of Java syntax and object oriented concepts will make learning Scala noticeably easier.
Scala was created by Martin Odersky, who began working on it in 2001 at the Ecole Polytechnique Federale de Lausanne, and it was officially released on January 20, 2004. It is not an extension of Java, but it is fully interoperable with it. When you compile a Scala file, it translates into Java bytecode and runs on the JVM, the same Java Virtual Machine that runs Java itself.
Scala was designed to be both object oriented and functional from the ground up. It is object oriented in the sense that every value is an object, and functional in the sense that every function is itself a value. Its name, short for scalable language, reflects the intent that it should grow comfortably as a project’s demands grow.
One of the first things that feels different coming from Java or Python is how Scala treats variables. When you declare a value with val, it cannot be reassigned once set, it is immutable. When you declare one with var, it can be changed later, the same as a normal variable in most other languages. Scala code leans toward val by default, which is part of why Scala programs tend to have fewer of the bugs that come from a value changing somewhere unexpected in a large codebase.

Scala lets you build any of these application types with less code than an equivalent Java project, and frameworks such as Play make it faster to get a web application running.
| Java | Scala |
| More verbose syntax, more code to express the same logic | More concise syntax, often half the lines for the same logic |
| Statically typed, with more boilerplate around types | Statically typed, with strong type inference that reduces boilerplate |
| Purely object oriented | Object oriented and functional at the same time |
| Runs on the JVM | Also runs on the JVM, and compiles to Java bytecode |
Scala and Java share a lot of common ground, both compile to JVM bytecode, but Scala’s syntax is generally more concise, and code written in Java can often be expressed in roughly half the lines once rewritten in Scala.
| Python | Scala |
| Dynamically typed, types are decided at run time | Statically typed, types are checked at compile time |
| Generally easier to pick up for a first time programmer | A steeper learning curve, especially around functional programming concepts |
| Widely used for data science, with a huge library ecosystem | Widely used for data engineering, tightly integrated with Apache Spark |
| Larger community overall | A smaller but strong community, especially in the Spark ecosystem |
Python and Scala solve different problems well. Python’s simple syntax and huge library ecosystem make it the easier starting point and the dominant choice for data science and machine learning. Scala’s static typing and tight integration with Apache Spark, which is itself written largely in Scala, make it a strong choice once you are working with large scale data processing, even though it takes longer to feel fully comfortable in the language.
Interoperable, compiling through the Scala compiler into Java bytecode that runs on the JVM.


Scala has grown steadily since its release and remains one of the more in demand languages in data engineering, largely on the strength of its role inside Apache Spark.

The chart below breaks down permanent versus contract based jobs available to people with Scala experience.

The video below, embedded on the original page, walks through these Scala concepts.
That covers the basics of Scala, how it compares to Java and Python, and where it fits in a data engineering career. To go further, explore Prwatech’s Apache Spark training program, which includes placement assistance.