Chapter 19
Abstraction and Polymorphism
Understanding the concept of abstraction is critical for improving your capabilities as a programmer. The ability to express our thoughts in more abstract ways is a significant part of what has allowed modern software systems to scale to the size they are today. We have dealt a little with abstraction already. Back in section 6.4 we saw how we could pass a function as an argument to allow us to accumulate multiple different types of values using a single recursive function. The basic idea of abstraction is that you want to write code where some part of what it does is not fully specified until it is used. We have used this idea significantly through the different methods in the Application Programming Interface ...
Get Introduction to the Art of Programming Using 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.