3 ms·
Clojure is unique in that its definition is contingent upon a host VM (CLR, JVM originally, JS as well now). It's not hard to come up with code that will work
by aidenn0 7y ago
Clojure is unique in that its definition is contingent upon a host VM (CLR, JVM originally, JS as well now). It's not hard to come up with code that will work in clojurescript but not Clojure/clr or clojure/jvm.
For client-side I tend to use Parenscript[1] which doesn't particularly try too hard to look like Common Lisp, but does allow for macros to be written in Common Lisp. Since it's not trying too hard to look like Common Lisp, javascript interop is dead-simple, but since the metaprogramming is in Common Lisp, I find it to be a good middle-ground.
[edit]
If it's not clear, parenscript has design requirements that make it unable to ever be a full common-lisp on its own; the desire is that you could emit a webpage where e.g. the onclick property is generated from parenscript, and it will work, without any other javascript libraries being loaded. This obviously means you, e.g. can't have a lisp numeric tower available.
1: https://common-lisp.net/project/parenscript/ https://common-lisp.net/project/parenscript/
- deleted 7y ago[deleted]