News for hackers. Stuff that matters.
Re:Software projects written in Haskell by gridlockd on Tuesday October 22, 2019 @07:44AM (#21322531)
For me, one of the biggest non-starters is a slow compiler, or rather a compiler that doesn't scale well. When people talk about how smart their type system or their compiler is, it immediately rings alarm bells for me.

This is one of the things that you may only learn the hard way, as your project grows in complexity. Nobody advertises how slow their compiler is.

So, my question is, how does GHC fare these days? How does it treat people that switched from a dynamic language, who are used to quick iteration?

Re:Software projects written in Haskell by the_af on Tuesday October 22, 2019 @09:19AM (#21323271)
I think quick iteration and feedback is one of Haskell's strong points :)

It has been argued before, in a fascinating but admittedly flawed experiment for the Naval Surface Warfare Center (US Navy) [1], that Haskell is a great prototyping language. This experiment is flawed for multiple reasons which the authors readily admit (e.g. the results from all contestants were self-reported, the requirements were vague [2], no code was actually run by the panel of judges, etc), but it's still tremendously interesting. It's also amusing that the judges couldn't believe the Haskell program was a working and complete implementation of the system, and thought it was either pseudocode or "too clever" for its own good (because of the use of higher-order functions)!

[1] http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.368...

[2] though one could argue vague requirements are actually another point in favor of Haskell as a rapid prototyping language. It's often argued -- mistakenly -- that languages with static typing are not good for exploratory coding, which this experiment tends to show not to be true.

Re:Software projects written in Haskell by mic47 on Tuesday October 22, 2019 @09:35AM (#21323410)
For quick iterations, you have ghci. You just edit your files, type :r and it will recompile only necessary files, which is really quick (and I miss it in most other REPLs). Similar with incremental compilation. But if you need to compile huge project always from scratch, of course, you will suffer.

There have been work on making haskell to have deterministic build to speed up compile time, and compare to scala, I find it way faster (in my current company, we use scala). But note that if you start using stuff like template haskell, your compilation will slow down.

Re:Software projects written in Haskell by gridlockd on Tuesday October 22, 2019 @10:53AM (#21324272)
Can you define "really quick" a bit better? Less than a second?
Re:Software projects written in Haskell by taylorfausak on Tuesday October 22, 2019 @11:36AM (#21324854)
To give you a single data point, our Haskell code base at ITProTV is about 50,000 lines of code. Reloading the project after a change in GHCi takes slightly less than one second. We haven't spent any significant effort on speeding up compile speeds, for what it's worth. It's fast enough.
Re:Software projects written in Haskell by flowless on Tuesday October 22, 2019 @09:57AM (#21323625)
It doesn't feel slow to me (compared to for example C++ compilation) and you can iterate quickly using cabal repl (:r) or ghcid[1] which both support partial recompilation of changed files.

[1] https://github.com/ndmitchell/ghcid

Re:Software projects written in Haskell by gridlockd on Tuesday October 22, 2019 @10:52AM (#21324246)
Comparing to C++ is a very low bar, that is why I was looking for comparisons with dynamic languages.

What is the turnaround time with these interpreters, then?

Re:Software projects written in Haskell by galaxyLogic on Tuesday October 22, 2019 @09:17AM (#21323250)
Quick iteration means quick feedback and that is a major success-factor for software projects I believe. The purpose of compiler is to give you feedback about what you're doing wrong, but if that feedback is slow then it loses much of its value. Goal is to guide the programmer, not stop them.