Hacker News new | ask | show | jobs
by madhuprasanna 4588 days ago
Nice. Some observations: Many languages compile to JavaScript(has highest number of source languages).

Java(I think JVM) and C++(native binaries??) has higher source languages.

Clojure has highest target languages(good to learn then).

Java to Java => Beanshell is interesting.

2 comments

This indicates that JavaScript is a pain in the ass, which it is.

This is neither an argument against JavaScript nor was it indended as one, just a personal observation from a long-time JavaScript programmer.

> This indicates that JavaScript is a pain in the ass

Or as another commenter pointed out that people want to write for the browser and want to use their favourite language to do so.

Maybe when analysing the stats it helps to distinguish between the intention of the one implementing the transcompiler (e.g. fun, proof-of-concept, research, money, actual need in a project, ...) and the size of the user-base of the transcompiler (in relation to the user-base of the language that is transcompiled to).

Lets say JS's user-base is pretty huge in relation to other languages (which is not an argument for JS). The stats show that a lot of languages transcompile to javascript, so I would indicate a real need for such projects, otherwise there would probably just exist a few as fun/proof-of-concept-projects.

Similar situation for C/C++ (maybe due to lack of high-level features) and Java (due to lack of practical features).

On the other hand: languages that only have a few or no transcompilers that compile to them, does not mean, they are better useable. There could be other things that make writing transcompilers very hard.

Maybe the fact that there are many compilers that target language A means that either language A is easy to target (so transforming to it is a fun hack) or no-one wants to program directly in language A or both (or more). I believe an example of A is JavaScript.