[Haskell-cafe] Toy application advice wanted
franka at cs.uu.nl
Wed May 5 15:45:21 EDT 2004
On May 3, 2004, at 5:52 PM, mikeb at manor.org wrote:
> I've got an interesting task this week for my job. (Note that this
> will undoubtably last for longer than a week). I'm evaluating several
> high-level languages as development vehicles for our next suite of
> applications. The languages I'm currently considering are Scheme,
> Erlang, and Haskell...
> The toy application I've "designed" for myself is a simple GUI-based
> app that can load a Sun .au format sound file, display its waveform in
> a window, perform some simple filtering, play the sound for the user,
> and then save the changed sound file back out to disk. If I get
> familiar enough with the respective environments I'd like to add
> zooming in/out and scrolling to the waveform display...
> I have an amortized four days (32 hours!!!) to implement this simple
> application in Haskell...
> Any advice/pointers/flames welcome. Thanks in advance.
Frankly, I think it's completely unrealistic to expect to be able to
fairly evaluate Haskell in 32 hours. As you noted yourself, Scheme and
Erlang, being strict, are much closer to conventional programming
languages than Haskell is, so it's easier to transfer skills to them.
Furthermore, they're untyped, and learning how to exploit Haskell's
static typing is one of the bigger hurdles to learning how to exploit
Even if, as you wrote in a later post, you lower your sights to
something less ambitious than a full-blown GUI app (which I think is a
good idea), it's hard get a grasp on concepts like laziness, recursive
datatypes, parametric polymorphism, monads, type classes and so on in
less than a week, even for experienced programmers. At best, I imagine
you'll come away curious and hungry for more; but clearly that doesn't
suffice for a "language evaluation".
Of course, the fact that Haskell can't be grasped in a day (or week)
can be construed as a practical argument against its adoption. On the
other hand, if you accept that there's no such thing as a free lunch,
you might consider that a merit; what is the point of adopting a new
language if it doesn't change the way you think about programming, and
let you write old programs in new, perhaps better, ways? 
While Haskell is IMO the best programming language around, and I want
to encourage its broader adoption, if you want a well-designed language
with good implementation and support which permits swifter skill
transfer, may I (strongly) recommend you add Objective Caml to your
list of candidates? Once you acquire some experience with an ML-like
language such as OCaml, which after all resembles Haskell in many ways,
you will, I believe, find yourself better equipped to evaluate Haskell.
 Think about polynomials and real numbers. Complex numbers were, I
believe, invented specifically to ensure that every polynomial equation
has a solution. So, to address some problems, we need to take a step
backward before we can take one forward.
More information about the Haskell-Cafe