Has anyone put this to the test on larger projects?
10,000 lines of Haskell have the same functionality as 100,000 lines of C++?
Has anyone put this to the test on larger projects?
10,000 lines of Haskell have the same functionality as 100,000 lines of C++?
There are issues outside of the actual authorship of code you need to take into account if you want to choose Haskell. I'll leave it at that.
It's a fantastic language undoubtedly.
But if you've never experienced the maintenance and upgrade of a very large Haskell codebase over a period of years, especially if you have a big dependency-tree, and need to interface with external tools (database drivers, etc.) I'd urge you to talk to someone who has for a view into the experience. Also ask about the state of things like profiling and compiler bugs/memory leaks.
EDIT: I want to note that the state the general Haskell ecosystem/tooling has improved at a dramatic pace in the last ~3-4 years, with the advent of HLS and recent GHC releases.
If one comes to believe there is a language that really is a lot better, then you have to get to work building out the ecosystem around it to realize that, and it isn't easy!
Here is cloc run against the repo:
$ cloc .
75 text files.
75 unique files.
12 files ignored.
github.com/AlDanial/cloc v 1.90 T=0.08 s (788.1 files/s, 271069.0 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
Haskell 29 2381 1321 15440
Markdown 5 393 0 1088
Bourne Again Shell 12 99 39 438
SVG 1 32 0 262
YAML 3 39 23 160
Dockerfile 6 35 54 104
Bourne Shell 8 3 4 99
--------------------------------------------------------------------------------
SUM: 64 2982 1441 17591
--------------------------------------------------------------------------------
I wouldn't say that this is a compressed version of a 100,000 lines of C++. I'm not adept at evaluating a Haskell source base to do a translation to C++ either.3-5kloc more and you would have a shell compiler!
It was only once when I saw problem that could be considered a bug.
But in real projects, are in wide use other pure functional langs (trying to write most popular first): - Erlang (telco, finance) - Lisp (finance, CAD) - Scala (basically universal) - Scheme (basically universal) - Elixir (frontend) - Clojure (don't know much, looks like also frontend).
But in most cases, they are sort of DSL, because functional paradigm is much better in some niches, but not so good in others.
Anyway, a modern competition with Python, Swift, Java, Modern C++, Rust, etc would be interesting.
Java 1.0 wasn’t even available when this paper was written.
Have not seen any comparable in popular languages (except Modula 3, which is for same domain), nearest as for me, guard expressions of Erlang.