Hermes Wiki

Prototype

Creates new objects by cloning an existing instance rather than constructing from scratch — useful when construction is expensive or the exact type isn't known until runtime.

Why we need this / what value this brings

Cloning an existing configured object can be cheaper than reconstructing one from scratch, especially if construction involves expensive setup.

When to use this

Object construction is expensive or the object's exact runtime type varies and you want to copy a preconfigured instance rather than rebuild it.

How to use or implement this

Implement a .clone()/copy method that produces a new, independent instance with the same state as the original.

Research questions

  • Rarely needed in typical CRUD backend code — mostly relevant in performance-sensitive or dynamic-typing-heavy contexts.

Empty folder — drop notes, links, and findings here as you research.

Hermes Wiki