Daily Term: Immutability
Immutability
Immutability refers to data that cannot be modified after it’s created, a core concept in functional programming. For example, in JavaScript, using Object.freeze creates an immutable object, and any modification creates a new object. Immutability prevents unintended changes, making code safer in concurrent environments, but it can increase memory usage since new copies are created for each change, requiring careful optimization.
Date: 2025-12-06