Hacker News new | past | comments | ask | show | jobs | submit login

Aye, that's the one big disappointment. Maybe the first pet project is an implementation of Clojure's immutable collections.



I'm guessing it wouldn't be the same language then. Most languages are pretty tied to their own dataa structures, and that's especially true of Lisps because code is data. After all, Clojure is not Scheme.

You might be looking for C++ :-P As I mention here, it is impressive that you can actually implement these structures are libraries.

https://www.reddit.com/r/ProgrammingLanguages/comments/7cdz5...


Immutable collections don't play well with non-GC memory management.


Exactly. Someone who doesn’t see the value in a GC-less language is not going to see the value here.

I personally think “functional persistent” data structures, as a language default, trade a lot of runtime performance in order to achieve some guarantees like thread-safety and functions not having side effects. Every mutation to every array or dictionary is treated like a transaction in a MVCC database, with the garbage collector in charge of cleaning up the records of every past version that wasn’t actually necessary to keep around, because no multiversion concurrency was actually necessary in that case. I encourage languages to experiment with other methods of achieving similar benefits.

I think limiting side effects and shared mutable state is very important, but at a local level, imperative code that mutates a data structure is highly readable and performant. Certain algorithms practically require it. Certain hardware practically requires it.

Functional languages let you think in terms of abstract “compound values,” but in practice these are backed by tons of little heap-allocated objects, partly so that lots of sharing can be done when the data structure is copied on every change.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: