Search code examples
clojurearc-lisp

Could Arc be implemented over Clojure?


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?


Solution

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