Is Prototype an anti-pattern?

When Joshua Bloch mentions that the Cloneable interface is broken in Java, why is the Prototype template, which uses the method clone()to facilitate object creation, not considered an anti-template in Java development?

"It's a shame that Cloneable is broken, but it happens." - Joshua Bloch

+4
source share
1 answer

No, the prototype is not antipattern.

The prototype design template is agnostic. It applies to many other object-oriented programming languages ​​and has many possible implementations.

, Java, , , . , , , .

+7

Source: https://habr.com/ru/post/1606985/


All Articles