3 ms·
It would seem to me the most significant challenge would be having functional data structures in C++, that would be a non-trivial effort I would think. Even if
by jb1991 5y ago
It would seem to me the most significant challenge would be having functional data structures in C++, that would be a non-trivial effort I would think. Even if you were to use other libraries that experiment with this. Without those, the language just doesn’t make any sense.
- toymachine1974 5y agoMy Park language does this https://github.com/toymachine/park-lang https://github.com/toymachine/park-lang Currently the syntax is mostly JS but the semantics is all clojure. I recreated the map and vector datatypes in c++ by adapting clojures Java code. it needs a GC though which is another big part of the implemention of Park
- vnorilo 5y agoYeah, that was the problem with most attempts I saw, unordered_map won't work. I did write a persistent hash map and vector [1], but ended up mostly using them in C++ projects. I wouldn't advise anyone else to use them at this level of testing/maturity though. Writing them was super interesting. 1: https://hg.sr.ht/~vnorilo/pcoll/browse https://hg.sr.ht/~vnorilo/pcoll/browse (not production quality)
- bertmuthalaly 5y agoImmer [0][1] seems like a really serious attempt at bringing high-quality persistent data structures to C++. [0]: https://www.youtube.com/watch?v=sPhpelUfu8Q https://www.youtube.com/watch?v=sPhpelUfu8Q [1]: https://sinusoid.es/immer/ https://sinusoid.es/immer/