The point goes to Haskell
On the surface, it may sound silly to compare these two languages because they’re about opposite as you could get: Python is interpreted, dynamically typed, and slightly weakly typed as well. Haskell on the other hand, is compiled, statically and strongly typed. But they’re both open source, and they both have large collection of libraries which are helpful for my work.
I’m creating Public.Law, putting all the U.S. laws online, similar to my first, OregonLaws.org. Most of my code is Ruby and Rails, but I want to improve the architecture and maybe move to a new language. So I’ve been parallel developing the scraping & import code in my candidate languages, Python and Haskell.
The screenshots above show the results of running my first failing test in each language — failing for pretty much the same reason in each case. My first test is, parse the NRS index page and return the number of Titles found. Python’s pytest puts a lot of junk on the screen in comparison to Haskell’s hspec. Reading the hspec output is a thing of beauty, really.
Your post reminds me of Thomas Leonard’s excellent blog series documenting his move from Python to OCaml. His retrospective: http://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-retrospective/
Excellent! Thanks, I’ll check it out.