Skip to content

Creation Patterns

The patterns in this chapter harken back to the “Creational Patterns” from the original Gang of Four Design Patterns book. In that chapter of their book, they discussed a number of now famous ways you can tackle instantiating objects including Builder and Factory Method.

Pony has object-oriented features that make existing object-oriented creational patterns applicable to the language. However, the addition of actors and Pony’s type system also lead to patterns that may be unfamiliar to object-orientation experts. Further, Pony is a rather functional programming friendly language which adds still more wrinkles.

In this chapter, we will cover the Pony variants of tried and true creational patterns while also adding new ones that are unique to Pony.