Immutable Data(不可变数据)的思想就是,不存在指向同一地址的变量,所有对Immutable Data的改变,最终都会返回一份新复制的数据,各自的数据并不会互相影响...
基于28个网页-相关网页
Modifying immutable data consists of building a new version of the data and working from the new version.
对不可变数据的更改包括构建数据新版本并从新版本开始工作。
Because Clojure trees are immutable data structures, any manipulation requires that we return a new, modified tree.
由于clojure树是不可变的数据结构,因此任何操作都需要返回一个经过修改的新树。
Immutable data cannot be changed and thus reading immutable data does not require locks, even when multiple threads are reading.
不可变数据是不能更改的,因此读取不可变数据无需用到锁,即使有多个线程读取时也是如此。
应用推荐