4 ms·
wish that were true, but i doubt it. scala, prolog and erlang are all higher on tiobe index.
by keymone 9y ago
wish that were true, but i doubt it. scala, prolog and erlang are all higher on tiobe index.
- yogthos 9y agoI personally don't view Scala as a FP language, it's a FP/OO hybrid. It's not opinionated in that regard, and a lot of code in it is written in traditional OO style or a mix of the two. Erlang is another widely used functional language, but it's not very widely used outside the telecom niche. Clojure has the advantage of running on the JVM, and makes it easy to target a much wider range of domains.
- keymone 9y agoright, but technically so is Clojure - you can get your hands dirty and mutable with relative ease. Scala's problem is that they marketed it as "we're almost java - you can just sprinkle some functionalness on your code as you go and you'll be fine".
- yogthos 9y agoClojure is a lot more focused and opinionated. It's unarguably a functional language first and foremost. Note that you can write any style of code in any Turing complete language, the key difference is what style of code the language encourages.
- lispm 9y agoClojure is also a hybrid. The other part is called Java or Javascript. This is claimed as an advantage, since there is already a lot of functionality in another language to be reused by a direct interface. Some stuff is simply deferred to the host language and since the other part is based on OOP, applications will then be a mix of more FP-oriented code calling OOP-oriented code.
- yogthos 9y agoThis is an implementation detail, and doesn't affect the API presented to the user. For example, consider the clj-http library that's backed by the Apache http Java library internally https://github.com/dakrone/clj-http https://github.com/dakrone/clj-http . As a user of clj-http, I don't know or care about the fact that it's a wrapper around OOP code. Furthermore, if you wanted to, you could reimplement the internals in Clojure and the users of the library wouldn't be affected. Being able to leverage existing mature libraries is a huge advantage, and the fact that they can be used via idiomatic functional APIs provides the best of both worlds experience.