Lazy Initialization
Noun · Development
Definitions
A creational pattern in which an object or resource is not allocated until the first time it is actually needed, deferring the cost of construction and avoiding allocation if the object is never used. Often implemented via a check-and-create guard or language-level constructs like Kotlin's `by lazy` or Python's `__init_subclass__`.
In plain English: Waiting to create something until the moment it is actually needed, instead of creating everything upfront just in case.
Example: "The database connection pool uses lazy initialization so cold starts don't block on connecting to a database the request might not even need."