Design Pattern: Prototype Pattern in Python

Prototype pattern enables us to create an object from an existing object(by copying or cloning it), rather than creating an object from scratch. This process saves the overhead of the initialization process required for creating a new object from scratch. In this article, we discuss the implementation of the Prototype Pattern in Python.

Design Pattern: Prototype Pattern in Go

Prototype pattern clones an existing object to create a new object, instead of building a new object at runtime. This helps reduce resource usage, as the complex object creation/initiation process is replaced with cloning existing objects. This is very useful for keeping object cached and/or default object. This article demonstrates Prototype pattern implementations in Go.