It's possible to connect to a production java server and hot swap code via eclipse. What's your point? Probbably not a good idea to do this for any real production system.
One of the big features of erlang is intelligent hotswapping for building robust telecom systems that never go down, but can be bug fixed/upgraded on the fly. Just because something is not commonly done with current tools doesn't mean its a bad idea, just that it is a bad idea with current tools.
My understanding is that built in java hot swapping is very limited, and indeed would be a bad idea to try hotswapping in production.
If the clojure repl brings us closer to the erlang world isn't that a good thing?
The type of code swapping you are doing with the repl, eg coding on the fly in the prod systems, and the type you are doing with erlang are completely different.
Erlang does have a much better deployment story than jvms as far as code swapping.
But AFAIK Clojure is compiling to bytecode and is under the same constraints as the JVM that it is hosted in.
> But AFAIK Clojure is compiling to bytecode and is under the same constraints as the JVM that it is hosted in.
This is true for certain features (protocols, records, and gen-class, which are easy to avoid for everything but high-performance bottlenecks and legacy interop), but vanilla Clojure functions are built around vars, which are specifically designed to support reloading.
edit: it's still primitive compared to Erlang, but it's miles beyond Java.
True good point. I still maintain that it's not a great idea in production and it really doesn't scale. I did stuff like this in single host servers in rails as well. Turns out to not be so repeatable and not a great idea in prod. Also isn't great if you bring down one node of prod or if you have a load that takes more than one box worth of processing.
I agree, but I would qualify that claim: it's not a great idea in production because the tooling to support doing it well doesn't exist, not necessarily because of limitations in the language.