Earlier quoted context omitted.
I would argue the immutability is actually not a great thing in Erlang to be honest. It makes it hard to reason about what gets copied, what gets shared in the global heap which may be a source of contention, makes code unnecessarily verbose, etc. I think it's one of those features (like lazy evaluation in Haskell) that language practitioners tend to advocate without necessarily understanding what tradeoffs they are…
It actually makes reasoning easy. What gets copied: everything. What gets shared: nothing.
Carp, a compiled Lisp with type inference and a borrow checker
21–30 of 112 posts
Re: Carp, a compiled Lisp with type inference and a borrow checker
#22I've been waiting for a non-Clojure lisp to make some headway. Immutability is mostly a fad: look at how incredibly complicated Clojure's implementation is. It's not worth sacrificing elegance just to attract the true believers.
Honest question: is immutability complicated in Clojure because it's hard, or because it's running in a virtual machine with no meaningful support for it? The Erlang VM has immutability deeply baked in, and it just works(™).
There are some problem domains - eg. GUI software, web browsers, simulations, many of the more complicated parsing, data extraction, or graph-traversal algorithms - that are inherently mutable, and Erlang is not used very much in these domains. C++ still rules the roost there, even though many of its practitioners hate its shortcomings.
Re: Carp, a compiled Lisp with type inference and a borrow checker
#23I really want to like Carp but I somehow feel that the Rusty memory model does not fit the Lisp philosophy... all the borrowing story comes from a basis mutability. I wish for something more Clojurish based on immutable data. Then one can exploit the power of inferred type linearity/affinity to transparently build safe "transients" and other cool stuff. Maybe some day I should write such Lisp myself on top of my C++…
Compiler support for this pattern is a huge plus in my book.
Re: Carp, a compiled Lisp with type inference and a borrow checker
#24Earlier quoted context omitted.
It sounds like arrays are mutable in Carp, so it doesn't feel like Clojure to me. As far as I understand, Clojure is also not big on macros, while Carp appears to be.
Aye, that's the one big disappointment. Maybe the first pet project is an implementation of Clojure's immutable collections.
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...
Re: Carp, a compiled Lisp with type inference and a borrow checker
#25Since this is about a pre-alpha language, it would be helpful for future web searchers to have a date in the title.
Re: Carp, a compiled Lisp with type inference and a borrow checker
#26Re: Carp, a compiled Lisp with type inference and a borrow checker
#27I've been waiting for a non-Clojure lisp to make some headway. Immutability is mostly a fad: look at how incredibly complicated Clojure's implementation is. It's not worth sacrificing elegance just to attract the true believers.
Re: Carp, a compiled Lisp with type inference and a borrow checker
#28Re: Carp, a compiled Lisp with type inference and a borrow checker
#29Since this is about a pre-alpha language, it would be helpful for future web searchers to have a date in the title.
Sorry to be a little off topic but I think search engines should penalize material that is not clearly marked with date of creation.
Re: Carp, a compiled Lisp with type inference and a borrow checker
#30Earlier quoted context omitted.
It actually makes reasoning easy. What gets copied: everything. What gets shared: nothing.
Except that isn't true in Erlang (or other BEAM languages). Binaries larger than some threshold are managed on a shared-heap. I think a couple other things have been promoted to being managed that way too fairly recently.