Live data from Hacker News

Carp, a compiled Lisp with type inference and a borrow checker

blog.veitheller.de

11–20 of 112 posts

Re: Carp, a compiled Lisp with type inference and a borrow checker

#12

I'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(™).

Re: Carp, a compiled Lisp with type inference and a borrow checker

#13

I'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(™).

It's hard. http://hypirion.com/musings/understanding-persistent-vector-...

Re: Carp, a compiled Lisp with type inference and a borrow checker

#14
post #10

Clojure + Rust => Carp?

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.

Re: Carp, a compiled Lisp with type inference and a borrow checker

#15

I'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(™).

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 making in the process.

Re: Carp, a compiled Lisp with type inference and a borrow checker

#16

Earlier quoted context omitted.

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(™).

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.

Re: Carp, a compiled Lisp with type inference and a borrow checker

#17

I 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++…

That’s one of its strengths though . A lisp with type inference and performance is quite rare. More lisps should be less lispy .

Re: Carp, a compiled Lisp with type inference and a borrow checker

#18
post #10

Earlier 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.

Immutable collections don't play well with non-GC memory management.
Post reply on HN