Hacker News new | past | comments | ask | show | jobs | submit login

Start a REPL and you can type code in that is immediately executed, and has no side-effects in terms of classfiles being generated or otherwise. How is that not interpreted?



Generating class files is an optional compilation mode in Clojure. You can also load bytecode and define classes without involving files on the JVM, which is what eval (used by the repl) does

https://clojure.org/reference/compilation

(also see the eval definition at https://github.com/clojure/clojure/blob/master/src/clj/cloju... - it calls into the compiler).

The JVM could still just interpret the JVM bytecode instead of JIT compiling first of course.

Python is also technically compiled like this


Clojure uses a custom classloader to compile and load bytecode at runtime.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: