What it is good for

The command design pattern is useful for cases where we want to delay, log, or sequence method calls for one reason or another. Another advantage is that it decouples the invoker from the object that actually performs the specific operations. This allows us to have modifications and to add new functionality pretty easily.

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