Advanced Features

In this chapter, we are going to explore the more advanced features of Scala. As with any programming language, some advanced constructs might be seldom used in practice or can obfuscate code.

We will aim to only explain features that we have encountered in real projects that have been deployed to production. Some features are used more in libraries or in the SDK than in a typical project, but it is important to understand them in order to be able to use a library effectively.

As these features are varied and cover a large spectrum, we found it easier to explain them using ad hoc code examples rather than a complete project. You can, therefore, jump directly to any section of this chapter if you are already familiar with some of these concepts.

In this chapter, we will cover the following topics:

  • Strictness and laziness, and their impact on performance
  • Covariance and contravariance
  • Currying and partially applied functions
  • Implicit usage
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset