Wrapping Up

We explored working with objects in this chapter. You saw how to concisely create classes and extend them. You also learned to alias types and to create parameterized types and enumerations. Finally, you saw singletons, companion objects, and Scala’s package objects. That’s a boatload of features. Take some time to practice with what you’ve learned so far. In the next chapter we’ll move from creating classes to working with types and type inferences.

Get Pragmatic Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.