Tag: immutability
🤖 AI Guestbook — #immutability educational data only
|
|
Last 30 days
Agents 3
No pings yesterday
Amazonbot 110Perplexity 90Google 33Unknown AI 27Ahrefs 23ChatGPT 19Claude 13Majestic 6Qwen 1
Most referenced — #immutability
No pings yesterday
How they use it
crawler 296
crawler_json 18
pre-tracking 8
Tag total322 pings
Terms pinged12 / 12
Distinct agents8
DateTimeImmutable vs DateTime PHP 5.5+
DateTimeImmutable returns a new object for every modification — the original is never changed. DateTime modifies in place. Prefer DateTimeImmutable in all new code to avoid subtle bugs where shared date objects are accidentally mutated.
2mo ago
php beginner
Object.freeze / Object.seal ES5
Object.freeze() prevents all property changes (add/modify/delete), Object.seal() prevents add/delete but allows modification — both are shallow, not deep.
2mo ago
javascript intermediate
readonly Classes (PHP 8.2) PHP 8.2+
PHP 8.2 readonly classes make all promoted properties readonly automatically — the cleanest way to define immutable value objects and DTOs.
2mo ago
php beginner
readonly Properties (PHP 8.1) PHP 8.1+
PHP 8.1 readonly properties can only be written once (in the constructor) — enforcing immutability without verbose accessor boilerplate.
2mo ago
php beginner
Thread Safety PHP 7.0+
Thread-safe code produces correct results regardless of how multiple threads interleave — achieved through immutability, atomic operations, or synchronisation primitives.
2mo ago
concurrency intermediate
toSorted / toReversed / with — Immutable Array Methods ES2023
JavaScript ES2023 adds immutable counterparts to mutating array methods: toSorted() returns a sorted copy, toReversed() returns a reversed copy, and with(index, value) returns a copy with one element replaced — none mutate the original array.
2mo ago
javascript beginner
Accidental Object Mutation Bugs ES2015
Objects and arrays are passed by reference in JS — mutating a function parameter or array element mutates the original, causing subtle cross-component state bugs.
2mo ago
javascript intermediate
Immutable objects defined by their attributes rather than identity — Money, Email, Coordinate — that encapsulate validation and domain behaviour.
2mo ago
architecture intermediate
Readonly Classes (PHP 8.2) PHP 8.2+
Marking an entire class readonly automatically makes all its declared properties readonly, simplifying immutable value object creation.
2mo ago
php intermediate
Readonly Classes (PHP 8.2) PHP 8.2+
Marking an entire class readonly makes all its properties implicitly readonly — ideal for immutable value objects and DTOs with minimal boilerplate.
2mo ago
php advanced
Readonly Properties (PHP 8.1) PHP 8.1+
Properties declared with readonly can only be initialised once and then never modified, enforcing immutability at the language level.
2mo ago
php intermediate
Value Object PHP 8.1+
A small immutable object defined by its value rather than its identity — two Value Objects with the same data are equal.
2mo ago
quality intermediate