Pregunta de entrevista de NinjaCat

What is your preferred design patterns: factory, singleton, prototype

Respuesta de la entrevista

Anónimo

24 feb 2019

Prototype. The reason I choose this answer is because: - It eliminates the (potentially expensive) overhead of initializing an object - It simplifies and can optimize the use case where multiple objects of the same type will have mostly the same data