Chapter 4. Abstract and Self Types

Designing and writing high quality code in software engineering is important in order to have applications that are easy to extend and maintain. This activity requires the domain to be well known, correctly understood by a developer, and the requirements for the application to be well defined. If any of these is absent, then writing good programs becomes quite challenging.

Many times, engineers model the "world" using some abstractions. This helps with code extendibility and maintainability and removes duplication, which in many cases could be a reason for bugs. Good code, generally, will consist of multiple small components, which depend on and interact with each other. There are different approaches that help ...

Get Scala Design Patterns 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.