Live data from Hacker News

Cljs2go – A ClojureScript to Go compiler

github.com

1–10 of 14 posts

Re: Cljs2go – A ClojureScript to Go compiler

#4
Very neat project, will be keeping an eye on it to see how it grows and progresses.

I love the idea behind this project. The clean and intuitive project structure and layout is exemplary.

At present the emitted go code is quite nasty looking [for human-readable purposes :D]. Not meant as a complaint, just an observation.

For an example of what the outputted go code looks like check out https://github.com/hraberg/cljs2go/blob/master/cljs/core/cor...

Re: Cljs2go – A ClojureScript to Go compiler

#6
Interesting project! May I ask why you chose ClojureScript over straight Clojure?

My understanding of ClojureScript is that it's Clojure syntax for a simple single threaded environment (probably an oversimplification), but with Golang you have a lot more reach in terms of concurrency.

Please forgive me if I haven't phrased this very well. I certainly don't mean to put a negative spin on this or anything; I'm just curious.

Re: Cljs2go – A ClojureScript to Go compiler

#7
post #6

Interesting project! May I ask why you chose ClojureScript over straight Clojure? My understanding of ClojureScript is that it's Clojure syntax for a simple single threaded environment (probably an oversimplification), but with Golang you have a lot more reach in terms of concurrency. Please forgive me if I haven't phrased this very well. I certainly don't mean to put a negative spin on this or anything; I'm just cur…

I would guess, because the cljs compiler infrastructure is written in clojure/clojurescript, thus easier to port and extend, compared to the clojure compiler which is written in java.

Re: Cljs2go – A ClojureScript to Go compiler

#8
post #6

Interesting project! May I ask why you chose ClojureScript over straight Clojure? My understanding of ClojureScript is that it's Clojure syntax for a simple single threaded environment (probably an oversimplification), but with Golang you have a lot more reach in terms of concurrency. Please forgive me if I haven't phrased this very well. I certainly don't mean to put a negative spin on this or anything; I'm just cur…

A contributing reason is because Clojurescript compiles down to javascript, which can compile down to anything JS touches. It's harder in the Java version because it compiles down to the Java bytecode.
Post reply on HN