Reputation: 58786
I have been reading up alot about Arc and it seems to provide some good thing. Since Arc is a lisp and Clojure is a Lisp I was wondering if Arc could be implemented on top of Clojure?
Upvotes: 1
Views: 513
Reputation: 91534
it souds like great fun to implament an Arc compiler in Clojure, though making it compile to JVM bytecode may be a bit more diffacult because of the TCO problems discussed above. Just because it's written in Clojure does not mean it needs to target the JVM.
On the other hand, an Arc interpreter would be very reasonable.
Upvotes: 1
Reputation: 17773
Most important issue that I can see immediately; Arc has real tail-call optimization, and clojure doesn't because of JVM limitations. AFAIK, this means you have to give up at least being able to call Arc functions directly as JVM methods, and also that you can't do a direct mapping of Arc functions to Clojure functions, which will probably mean you lose some performance.
Probably means you won't be able to easily create a compiled/efficient version of Arc using plain clojure. A "toy" interpreter on the other hand shouldn't be too hard if you know what you're doing.
Upvotes: 1