4 ms·
Why reimplement all of clojure as an interpreter? Why not just rewrite the java parts in python and compile to bytecode? Honest question.
by pavelludiq 15y ago
Why reimplement all of clojure as an interpreter? Why not just rewrite the java parts in python and compile to bytecode? Honest question.
- moonchrome 15y agoActually a better path would have been to hack on the ClojureScript compiler that compiles to JavaScript and fork it to compile to Python, most of the core stuff is implemented with ClojureScript primitives (like seq library, collections, atoms, etc.) so there would be substantially less work starting from there.
- Symmetry 15y agoAre you familiar with PyPy? It was originally just an exercise in implementing Python in Python, but then it was discovered that this led to some very interesting possibilities for JIT compilation, and after a lot of work PyPy is now much faster for most tasks than regular CPython. The thing is, there's nothing about PyPy that says it has to be implementing Python itself, and recently here on Hacker News there was an article where someone was singing the praises PyPy as a way to implement the language he was developing. http://tratt.net/laurie/tech_articles/articles/fast_enough_vms_in_fast_enough_time http://tratt.net/laurie/tech_articles/articles/fast_enough_v... And it seems this person had come to the same realization. EDIT: Oops, rereading I see I misunderstood something the README said, and he is only now considering using PyPy instead of CPython.