Lazy initialization

Lazy initialization in software engineering is when we delay the instantiation of an object or a variable until the first time we need it. The idea behind this is to defer or even avoid some expensive operations.

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.