Personal tools

From a newbie

From HaskellWiki

Revision as of 21:31, 10 January 2007 by MathematicalOrchid (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

1 Introduction

Greetings. I am a Haskell newbie. I am writing this page because I couldn't think of any other way to get attention. (More on this below.) Maybe somebody will see this page and add some useful comments. Maybe this page will simply be deleted. I don't know…

2 First Impressions of Haskell

For some background... I first starting programming with BASIC, way back in the Dark Ages of 8-bit home computers. I then moved on to raw machine code (couldn't afford an assembler). From there I went on to Pascal — which I found much to my liking. Later I learned about Smalltalk and Java. (Java — Nice idea, shame it's a crock of junk…)

Then I learned Haskell. Presumably it goes without saying that it was a mind-bending experience. (!) Much like learning OOP — but more intense! Haskell is utterly unlike anything I have ever seen before… and I think I like it!

3 The Trouble with Haskell

Sadly, it turns out that Haskell appears to have 2 fatal problems. (Which is really what I'm writing this page for.)

3.1 The First Problem

It seems to be that virtually all programming languages can be neatly seperated into two disjoint categories:

  • First there are type-I languages. Surely C is the apex of what it is to be a type-I language. C is ugly, complex, low-level, poorly defined, dangerous, extremely hard to read, and actually impossible to write. In short, C is a disgusting language which should never ever have been invented in the first place. But you can do stuff in C.
  • And then there are the type-II languages. Things like Smalltalk, Eiffel, etc. Languages which are simple, flexible, powerful, elligant, beautiful. Languages with are a sheer joy to program with. Unfortunately, you cannot do stuff with type-II languages.

If Eiffel is “powerful” then Haskell is surely some kind of weapon of mass destruction! Regrettably, it seems that Haskell is yet another type-II language. Inside Haskell you can write some amazing stuff. But you just can't talk to the outside world. No graphics, no sound, no GUI, no networking, no database access, no compression, no cryptography, no threading… the list just goes on and on.

Do you have any idea how frustrating it is to have found such a supremely powerful programming language and yet have utterly no way of using it?!

Also, in common with many type-II languages, I find the language itself works, but everything else around it is lacking. Tools don't work well. Libraries are sparse. Everything is fairly poorly documented. It just makes life harder. (I could name any number of standard modules right now that have virtually no documentation beyond function names and type signatures.)

3.2 The Second Problem

The other problem is the Haskell community — or rather, the total non-existence of such. There are no web forums, no NTTP server, nothing. Nowhere a newbie like me can ask questions. I've had to resort to creating an orphan Wiki page just to say want I wish to be heard. This isn't an efficient way to communicate.

I understand there is an email list, but SMTP is really not well suited to large group discussions. NNTP works much better for that. (Assuming you have a client and know how to use it. Web forums are generally a better idea.)

Oh, there is the Haskell IRC channel. Boy, that was a hoot! I've been on IRC channels with 6 people that are so busy you can't tell who's talking to who. But the Haskell IRC channel was something else… Over 300 people connected, and nobody speaking! Every 20 minutes or so, somebody would ask a question or something. They were all greeted by utter silence.

Extremely amusing, but not especially helpful.

So it is that I am left with half a dozen “getting started” tutorials scattered over the Internet, plus the Language Report. The Language Report of course is a reference document. And very unfriendly it is too. Oh, and there's the library docs — highly incomplete as they are.

All of this is really quite dissappointing. I actually have several questions I'd like answers to, but I can't find anywhere to ask.

4 In Closing

Oh well, since I'm here I suppose I might as well ask a few actual questions rather than just looking like I'm here to flame everything.

  • Why does every non-trivial program or library require language extensions. Seriously. What the hell? Is plain Haskell 98 such a feeble language that no interesting software can be written with it? If so, that doesn't bode well! (For example, I tried to use the module Control.Monad.State. However, instead of importing the module I merely got a fairly opaque error message basically telling me I need to enable extensions. Why? It's perfectly possible to write a state monad in plain Haskell. So why do the standard modules not to this??)
  • Why is it that Haskell seems to attract people who casually throw around phrases like “existential qualification” as if they mean something? Seriously. All programming languages have their own special terms, and in some cases stuff doesn't really make sense until you learn these. (For example, in OOP people debate whether “inheritance breaks encapsulation” or that “inheritance is overused and collaboration is underused”.) But Haskell seems to attract utterly bizzare terms vastly more than any other language I've ever seen! Why is that?
  • Is there any way to make is to that making a type an instance of class X automatically makes it an instance of class Y? I'm getting really tired of cut-and-pasting identical instance definitions…
  • When I read about 'lines' and 'words', I was expecting them to by curried versions of some more general function. However, it appears that no such general function exists. Why?
split_with :: (Eq t) => t -> [t] -> t
split_with ":" "5:11:21" == ["5","11","21"]
It's not hard!
  • Does anybody have a good explanation of the seemingly arbitrary and random distribution of numerical types and classes? I'm sure I'm not the only person confused by this…
  • Is there any way I can make it so that 'Complex' means 'Data.Complex.Complex Predule.Double'? I have tried and tried and tried to make this work; Hugs isn't having any of it.
  • You know that the latest release of Hugs is horribly unstable, right? I mean, I used the Nov 2003 version for a long time, without issue. But the new Sep 2006 version behaves very unpredictably. It has a habit of truncating output, reprinting bits of previous output (the intro banner is especially popular), and frequently just stopping with a Dr Watson error. What the hell…?
  • Does anybody know what 'seq' actually does? The Prelude documentation is a fleeting comment about “avoiding unnecessary laziness”, but presumably an entire book could be written on such a subject. Where is this book?

If anybody has anything useful to say, please add it to the bottom of this page.

MathematicalOrchid 21:31, 10 January 2007 (UTC)