What is the benefit of purely functional data structure?

前端 未结 5 1014
南方客
南方客 2020-12-12 14:27

There are large number of texts on data structures, and libraries of data structures code. I understand that purely functional data structure is easier to reason about. Howe

5条回答
  •  臣服心动
    2020-12-12 14:53

    Erlang programs use purely functional data structures almost exclusively, and they reap substantial benefits by scaling almost seamlessly to multiple cores. Because shared data (mainly binaries and bit strings) is never modified, there is never a need to lock such data.

提交回复
热议问题