[CLJCLR-11] Simplify integration of Clojure code with existing .NET code Created: 03/Mar/13 Updated: 04/Oct/14 Resolved: 04/Oct/14
|Reporter:||Aaron Craelius||Assignee:||David Miller|
It would be nice to have a nice high-level wrapper class for key Clojure integration functions. In IronPython for example, there is a IronPython.Hosting.Python class. For ClojureCLR, I created the attached clojure.lang.Hosting.Clojure class which provides three simple functions Require, GetVar, and AddNamespaceLoadMapping (for integrating .clj files into .NET assemblies as embedded resources). This class or one like it is a simple suggestion to make integration with existing code as painless as possible.
Clojure.GetVar("clojure.main", "main").invoke(); // Starts an embedded Clojure REPL
This is much simpler than:
Symbol CLOJURE_MAIN = Symbol.intern("clojure.main");
|Comment by Aaron Craelius [ 06/Mar/13 8:42 PM ]|
This is an updated patch that supercedes the previous patch adds an AddToLoadPath method.
|Comment by David Miller [ 04/Oct/14 5:55 PM ]|
This was fixed with the clojure.clr.api interface. (See documentation for clojure.jvm.api.)