@neo2551 Thank you! What is the advantage of combining with the JVM? Java libraries?
Java libraries, maturity, etc. I don't know how Python handles that but coming from Ruby, lots of things are immature or don't exist - for example, "lazy fetch" from databases, streamable files/compressed files in multiple formats, etc...
@nick.romer Not tight to JVM, but Clojure default behavior around immutable associative data structures (maps) and collections (vector) allows to free your mind about side effects and unexpected behavior. My favorite example:
d = {"a": 1}
f(d)
# what is d?
You have no clue about d
in python, because it might happen that f
changes d
. Hence your mind will have to switch levels of abstractions constantly. As for the JVM, I like the ability to write concurrent job with only the need to solve intrinsic problems from concurrency. And yes, Java libraries (but also all the JVM language, scala, groovy, kotlin if they expose a Java interface). In the end, it will depends on what you really value on your code base. Do you value stable and flexible APIs? Reasonability? Concision? Leverage? REPL? After writing a lot of python, I felt I could never reach the same pareto optimal between simplicty and reasonability in Python as in Clojure, so I decided to stop python, because I have better things to do in life. But obviously, it also reduced my marketability as there are fewer jobs in clojure as in python. That being said, the problem that Clojure exposes to you are so much more interesting (concurrency, design, scaling, leverage, testing) than in Python. One example is about testing. In Clojure, we are more or less sold on generative testing (property based testing) and most of tutorials (beginners and advanced) will guide you through this philosophy. In Python, intermediate tutorials or guide will be about setting up and tearing down your test because of side effects.And yes, ability to write UI with Clojure is also a big advantage in the data science world. Your dashboard library will just go to the dustbin and you will use vega-lite/plotly/d3.js/whatever-you-like with a sane reagent wrapper and it will look stunning.
Plus it will be portable to all plateforms and you will learn the real challenge of deployment, whereas with Python you will get stuck to whatever the dashboard library (like dash) will constrain you to do.
but it is only my anecdotal and opinionated experience, you should totally ask those who went back to python why they did so.
(The beautiful discussion today will probably disappear from slack in a few days. One place where it is conveniently archived is zulip: https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/data-science thanks to @eval2020's automatic archiving of selected slack channels.)