Chapter 1. Setting up the Development Environment
Before we start writing the various programs in this book, let's talk a little about the Scala language itself. Why is it necessary, and what has made Scala unique? What are the most important aspects of the language?
Scala was created in 2001 in EPFL (École Polytechnique Fédérale de Lausanne), by Martin Odersky. This is the same lab where Pascal language (widely used up to the end of the 1990s) was created.
Scala is an abbreviation for 'Scalable Language'—a language which can be scaled, that is, it allows you to write complex systems with gigantic amounts of functionality. As specified on Scala's home page: " Scala combines object-oriented and functional programming in one concise, high-level language."
Note
You can visit Scala's official home page here: https://www.scala-lang.org/
By the end of this chapter, you will be able to:
Recognize the structure of a Scala project
Identify the use of Scala's sbt tool (interactive build tool) for building and running your project
Identify how to use the IDE
Implement interactions with a simple chatbot
Scala is built on top of the JVM platform (the Scala program is compiled to use JVM bytecode).
Now, the language is used as one of the most preferred platforms in many areas, such as high-load soft-realtime applications, ad servers for data science toolkits.
Some characteristics of Scala are as follows:
An advanced type system, which makes Scala superior (but at the same time, more complex) compared to most other industrial programming languages.
Static typing, which allows you to write code in a safe way when errors are checked during compilation.
In this chapter, we will learn the basics of Scala, such as what the simple Scala program looks like and what a typical developer flow is. A significant part of development is interaction with tools—build tools, dependency extractors, IDEs, and so on, which form the tool ecosystem with the language. We will build a simple program using mainstream tools.