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 ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.