what's a good persistent collections framework for use in java?

前端 未结 13 1438
-上瘾入骨i
-上瘾入骨i 2020-12-01 06:39

By persistent collections I mean collections like those in clojure.

For example, I have a list with the elements (a,b,c). With a normal list, if I add d, my original

13条回答
  •  盖世英雄少女心
    2020-12-01 07:06

    The top voted answer suggest to directly use the clojure collections which I think is a very good idea. Unfortunately the fact that clojure is a dynamically typed language and Java is not makes the clojure libraries very uncomfortable to use in Java.

    Because of this and the lack of light-weight, easy-to-use wrappers for the clojure collections types I have written my own library of Java wrappers using generics for the clojure collection types with a focus on ease of use and clarity when it comes to interfaces.

    https://github.com/cornim/ClojureCollections

    Maybe this will be of use to somebody.

    P.S.: At the moment only PersistentVector, PersistentMap and PersistentList have been implemented.

提交回复
热议问题