Jérémy Decool 7/21/2015

Objets-Valeurs et immutabilité

Read Original

L'article explique pourquoi l'immutabilité est un concept fondamental et indissociable des objets-valeurs (Value Objects). Il détaille comment un état immutable garantit l'intégrité de l'identité de l'objet et illustre le principe avec des exemples de code PHP, comme une classe Money, où toute opération crée une nouvelle instance.

Objets-Valeurs et immutabilité

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

2
Designing Design Systems
TkDodo Dominik Dorfmeister 2 votes
4
Fragments Dec 11
Martin Fowler 1 votes
5
Adding Type Hints to my Blog
Daniel Feldroy 1 votes
6
Refactoring English: Month 12
Michael Lynch 1 votes
8
10
You Gotta Push If You Wanna Pull
Gunnar Morling 1 votes