Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Scala Programming

You're reading from   Learn Scala Programming A comprehensive guide covering functional and reactive programming with Scala 2.13, Akka, and Lagom

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781788836302
Length 498 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Slava Schmidt Slava Schmidt
Author Profile Icon Slava Schmidt
Slava Schmidt
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. An Introduction to Scala 2.13 FREE CHAPTER 2. Understanding Types in Scala 3. Deep Dive into Functions 4. Getting to Know Implicits and Type Classes 5. Property-Based Testing in Scala 6. Exploring Built-In Effects 7. Understanding Algebraic Structures 8. Dealing with Effects 9. Familiarizing Yourself with Basic Monads 10. A Look at Monad Transformers and Free Monad 11. An Introduction to the Akka and Actor Models 12. Building Reactive Applications with Akka Typed 13. Basics of Akka Streams 14. Project 1 - Building Microservices with Scala 15. Project 2 - Building Microservices with Lagom 16. Preparing the Environment and Running Code Samples 17. Assessments 18. Other Books You May Enjoy

Summary

Scala 2.13 is a minor update of Scala with the main focus on the redesigned collection library. The few small additions to the standard library, such as automatic resource management, just accentuate this fact.

The new collection library mainly consists of two intermixed inheritance hierarchies with a similar shape. Members of the first hierarchy describe the structure of the collection and members of the second hierarchy—operations available on this collection type. Because of the inheritance relations, the collections situated lower in the tree define additional methods for more specific collections and override methods defined by the parent traits to provide more efficient implementation as required.

The three main collection types are Seq, Set, and Map. Each of these types has multiple implementations that are useful in specific situations. Set is also a function of one argument; Seq and Map are PartialFunctions.

Most of the collections are available in mutable and immutable forms.

In addition to the collection hierarchies, there is a concept of View, which is a reified definition of iterators’ operations and can be used to lazily apply transformations to the collection. Another related abstraction is IterableFactory, which implements some general ways to create collection instances and to perform conversions between collection representations.

In the next chapter, we will shift our focus from the new features of version 2.13 to a general exploration of Scala, starting with its type system.

You have been reading a chapter from
Learn Scala Programming
Published in: Oct 2018
Publisher: Packt
ISBN-13: 9781788836302
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image