Needs advice
on
ClojureClojure
and
ScalaScala

Basically, I am looking for a good language that compiles to Java and JavaScript(and can use their libraries/frameworks). These JVM languages seem good to me, but I have no interest in Android. Which programming language is the best of these? I am looking for one with high money and something functional.

Edit: Kotlin was originally on this list but I removed it since I had no interest in Android

READ LESS
6 upvotes·45K views
Replies (3)
Recommends
on
Scala

Clojure is a Lisp dialect, so if you like Lisp that's probably the way to go. Scala is more popular and broadly used, and has a larger job market especially for data engineering. Both are functional but Scala is more interoperable with Java libraries, probably a big factor in its popularity. I prefer Scala for a number of reasons, but in terms of jobs Scala is the clear leader.

READ MORE
6 upvotes·2 comments·43.9K views
Chris Howe-Jones
Chris Howe-Jones
·
February 17th 2022 at 6:42PM

I would disagree that Scala is more interoperable with java libraries altho it depends. I agree implementing abstract classes if required might be more tricky but simply calling Java is simple.

I've not used Scala.js but JavaScript interop is simple in Clojure and React.js is particularly well supported.

·
Reply
Jean Casteaux
Jean Casteaux
·
September 11th 2022 at 12:40PM

Scala.js interop with JS is amazing too, and there are numerous projects to integrate seamlessly with the React world. For instance: https://slinky.dev/

·
Reply
Recommends
on
Scala

Scala has more momentum. It is good for back-end programming. The popular big data framework Spark is written in Scala. Spark is a marketable skill.

If you need to program something very dynamic like old school A.I., Clojure is attractive. You would chose Scala if prefer a statically typed language, and Clojure if you prefer a dynamically typed language.

READ MORE
4 upvotes·1 comment·43.9K views
Alex Peake
Alex Peake
·
February 15th 2022 at 3:43PM

Adding to what Sami said, Scala is a more complex language to learn(for example, you need to know about co-variance and contra-variance], but it is extremely powerful, and has more compile time safety. Closure is a relatively simple language to learn, and just as capable for whatever you need to do. It has more type safety than you might at first think, with the ability to declare types. It also has a macro language, which I find enhances productivity.

Both have well paying jobs available, probably more jobs for Scala. If I am writing for my own projects, I prefer the simplicity of Clojure.

·
Reply
View all (3)
Avatar of Prakhar Vatsa