
OK, I'm taking the plunge and using Haskell in a course I'm teaching this semester. To get ready, I've been doing quite a bit of Haskell programming myself, and this has raised a few questions...
* What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs is smaller and easier for people not named Simon to modify, while GHC is a real compiler and has the most up-to-date hacks to the type checker)? Do people generally use one or the other for everything, or are they similar enough to use Hugs at some moments and GHC at others?
All the below is my personal opinion: My impression is that GHC is by far the most used Haskell implementation. In my opinion, the only reason Hugs should be used is if it's the only implementation that will run on your system, otherwise GHC or NHC will likely make a better choice. Some of the differences between GHC and the last version of Hugs I've looked at are: 1) GHCi views it's repl as being in a do-block, with the most important consequence being the ability to define functions interactively, Hugs views the input as an expression so functions can only be defined locally. Neither are rather impressive interactive environments (not when compared to Squeak or CL listeners), but GHCi's is definitely more convenient. 2) GHC is generally acknowledged to do a (significantly) better job with error messages (both type and run-time errors). To me, the difference is so significant that, all other things being equal, GHC would still win hands-down. 3) Most development of third-party libraries and tools target GHC first, part of that has to do with 4) Beyond enhancements to type checking, GHC has many other extensions such as: template haskell, preemptive concurrency (Hugs does have cooperative concurrency), asynchronous exceptions, built-in arrow notation, support for generics, and more. 5) And of course, (3) is also caused by second order effects of itself, e.g. Yi uses GHC because it uses hs-plugins which is intimately related to GHC. 6) GHC has support for profiling.
participants (1)
-
Derek Elkins