back

by iLemming·6y ago·view on hn ↗
> macros are not allowed in ClojureScript

Macros ARE allowed in Clojurescript, they just need to be defined in other than a Clojurescript file, because of the way how macros work. And you still can do pretty cool stuff with macros. Also if you really need to, you can actually define a macro in Clojurescript that would use `eval`, but nobody does that, because it's rarely needed.

https://gist.github.com/alandipert/4669472

> Transpilation has always seemed to end in failure

There will always be a possibility for languages of higher-level of abstraction, e.g:

Assembly -> Fortran

Assembly -> C -> Python

JVM -> Java

JVM -> Scala

etc.

There will always be languages that transpile, compile into Javascript. It is especially becomes more relevant with the grows of JS, which is no longer a "small scripting language", ECMAscript spec is over 800 pages long today and they keep adding stuff. Java and JVM kind of become "assembly" languages for their respective platforms.

There are many benefits from using the same language on both back-end and front-end. And besides Nodejs, there are a few other options, including Clojure. JS devs even been transpiling one version of ECMAscript to another for many years. If doing that was a "failure", how can you explain so many small and big companies have adopted that model?