O'Reilly logo

Beginning Scala by David Pollak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Traits and Types and Gnarly Stuff for Architects

So far, we've explored Scala from what I consider the "library-consumer" perspective. For the most part, when I'm consuming libraries, I don't worry about complex types, composing many traits into a class, or some of the other powerful features of Scala. "Why?" you may ask. Well, I'm worried about the transformation of input to output, happily mapping Lists, and filtering Seqs. When I'm coding in this mode, I'm not reasoning about my types, but I'm confident that Scala will make sure I don't do anything horribly wrong and that as long as my logic is sound, my code will work. When I'm in this mode, I'm writing code the same way I write Ruby code: I'm looking to get something to work and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required