[Haskell-cafe] Elevator pitch for Haskell.

Andrew Coppin andrewcoppin at btinternet.com
Sat Sep 8 14:50:50 EDT 2007

Neil Mitchell wrote:
>> * Read and write standard binary file formats. (Images, compressed
>> files, etc.)
> Data.Binary is the low level frameworks, now people can pick up the rest.

Last time I checked, there's about half a dozen "binary" packages. All 
incompatible. All with different design. Seriously not obvious which one 
to use...

> Databases are dead, long live flat files :-)

LOL! That's cute...

>> * Use various network protocols (possibly custom, possibly standardised).
> The great thing about Data.Binary is that its for binary stuff,
> whether it be networks or files.

Does it enable you to, say, send raw ICMP packets?

AFAIK, Haskell supports TCP, and nothing else. (A while back I wanted to 
write an automated pinging program. But the only way I could figure out 
how to do it is to call the OS "ping" utility and attempt to parse what 
it writes to stdout. Oh, did I mention that's different on WinNT, WinXP 
and UNIX?)

>> * Access the Windoze registry and play with COM stuff.
> H/Direct, System.Win32. My only question is why you want to build
> non-portable software when Haskell is so beautifully portable.

Portable is all good. But being unable to use something just to be 
"portable" isn't so good.

If some guy wants to develop a Windoze app and you say "oh, sorry, 
Haskell can't do that, it would be non-portable", they're going to go 
somewhere else.

>> * Get system-specific file information (protection bits, modification
>> times, security information, etc.)
> The Unix stuff does all this, and the win32 stuff does it on Windows.

Mmm... looks lovely. Any danger of documentation?

(I suppose I could try and guess what this stuff does. And arguably if 
you find yourself needing to know what access permissions there are on a 
file, you probably already need to be intimately familier with the ugly 
innards of Win32...)

>> * Query the OS. (How many CPUs? How much RAM? What is my IP address?)
> Easy enough, if anyone took the time to FFI to a library.

IOW, it could be done, but it hasn't been.

(I'd try it myself, but I don't know C and I don't know how you'd get at 
this information from C anyway.)

> The
> array API is a bit poor, but should never be used - lists are more
> functional.

Yes, that's right - because nobody ever needs random access to a very 
large data structure, do they? ;-)

> Most of your problems are lack of libraries.

I agree.

This is what pains me so much. Haskell is yet another beautiful language 
that utterly lacks the necessary libraries to turn it into a real-world 
useful tool for world domaination. All that power and no way of getting 
it to the tires... :-(

> We've had Cabal in
> mainstream for maybe a year, hackage is even newer. People know where
> the problems are, and they are being fixed.

Yeah, sure. It's easy to compain about other people's hard work. 
Unfortunately, I don't have anything useful to contribute in that 
direction. Which ends up making me just sound like some person who 
enjoys whining about everything.

BTW, can somebody explain to me what the heck Cabal *is*. I really don't 
get this. What is it for, and what is it supposed to do?

More information about the Haskell-Cafe mailing list