java-script:immutability
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| java-script:immutability [2023/08/11 09:08] – [2. Object.freeze] odefta | java-script:immutability [2025/01/02 18:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 23: | Line 23: | ||
| Libraries such as Immutable.js provide persistent immutable data structures. These are collections that, once created, are never changed. Any modifications to the collection return a new collection that shares as much of the structure with the original as possible, minimizing unnecessary copying. | Libraries such as Immutable.js provide persistent immutable data structures. These are collections that, once created, are never changed. Any modifications to the collection return a new collection that shares as much of the structure with the original as possible, minimizing unnecessary copying. | ||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | **Object.freeze** can be slow, especially if used recursively on large objects. **Immutable.js** is optimized for performance and can handle large data structures efficiently. | ||
| + | </ | ||
| ===== 4. Functional Programming Techniques ===== | ===== 4. Functional Programming Techniques ===== | ||
java-script/immutability.1691744900.txt.gz · Last modified: (external edit)
