5 ms·
Most of the work in Clojure web dev so far (that is also publicized, that is) is also oriented towards green-field projects, and not integrating with existing w
by cemerick 16y ago
Most of the work in Clojure web dev so far (that is also publicized, that is) is also oriented towards green-field projects, and not integrating with existing web frameworks. That will change, at which point Clojure will come to embrace Java warmly when necessary (e.g. witness the addition of annotation support).
- weavejester 16y agoWhy do you think it will change? Whilst Clojure has very support for interfacing with native Java libraries, they are fundamentally two very different languages. The number of "green-field" projects are an indication that a web framework built for a dynamically typed, functional lisp, has a very different structure to one built for a statically typed object-orientated language like Java. If anything, I see Clojure web development relying less on native Java libs in future, not more.
- cemerick 16y agoI wasn't saying that idiomatic web development in Clojure will change, just that whatever pieces are necessary to support deep integration with existing web frameworks and tools will continue to emerge. This is a domain-specific problem, not a general one. Simple host library interop is just the beginning -- annotations are a next step, and I can imagine being able to emit Java source being a later step (so that one can deploy applications that include code written in Clojure to environments where one might not be able to ship with Clojure).
- weavejester 16y agoMaybe. My experience of Java web frameworks is that they mostly tend to be written in very idiomatic Java. So lots of objects and factory classes, XML configuration for the older frameworks, annotations for the newer ones, that sort of thing. It seems to me that the philosophy of most Java frameworks is so different from that of Clojure, you'd have difficulty reconciling the two. I'm sure you could write a Clojure interop wrapper, but it seems to me as though there wouldn't be many advantages to using it.