When Is Haskell More Useful Than R or Python in Data Science?
The bulk of people trying to get stuff done in a data &#x2F; statistical &#x2F; ML context are heavily biased toward not having to write their own tools. I fancy myself a reasonably good programmer, and reasonably competent at applied statistics, but if I had to, say, implement a way to estimate my own GLMs, I’d quickly go crazy.<p>A lot of research and data science (at least as far as the computing is concerned) is plumbing just like a lot of web development is writing CRUD apps.<p>Part of the success of R is that statistical researchers (i.e. the tool makers) implement clever new methods in R. Someone else has done the lit review comparing that fancy new method to other related methods. Someone else has validated the math. Someone else uploaded the code to CRAN.<p>Python has historically lagged R in the stats space because statisticians weren’t building tooling for it. Even fairly common models that have long been in R are still missing from the Python ecosystem.<p>But something started to change a few years back when the buzz about Bayesian methods started. Most MCMC based estimations of Bayesian models became more of a computational problem than a stats problem. Python started to not be laughably deficient in Bayesian methods.<p>And then we started having an explosion of deep learning whatnot, and nobody knew what the hell they were doing, and so everyone just used the frameworks gifted from big companies like Google—and they released stuff with Python APIs.<p>So I think that what language you use for data science is still driven by ecosystem, and also your ecosystem’s comparative advantage in implementing the methods you care about.<p>All else being equal, I’d love it if we had better languages for data science. Julia may get there—it’s a reasonably nice language that both Pythonistas and R...barians(?) find inoffensive. Given the strength of R’s tidyverse in implementing useful DSLs, I’d love to see the Racket community blow our minds with the language-oriented programming that they’re about, but ultimately mind-blowing will take a back seat to ecosystem.