What it is not so good for?

Mistakes and side effects could be caused using shallow copies of objects, where the actual references point to the original instances. Also, avoiding constructors could lead to bad code. The prototype design pattern should be really used in cases where there might be a massive performance impact without it.

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.