dimanche 11 août 2019

Why dynamic languages don't guarantee the state of an object?

I have come across the description of the memento design pattern:
https://refactoring.guru/design-patterns/memento

At the bottom of the page in the 'Pros and Cons' section, the author states:

Most dynamic programming languages, such as PHP, Python and JavaScript, can’t guarantee that the state within the memento stays untouched.

Does this mean that the state of an object can change randomly? If so why? I am bit confused on this.

Aucun commentaire:

Enregistrer un commentaire