A question regarding the usefulness of languages (38)

27 Name: dmpk2k!hinhT6kz2E : 2008-04-27 19:41 ID:Heaven

> If the assertion is that monads only have use in lazy languages then I disagree with that assertion.

Do you think they're worth their cognitive weight in strictly-evaluating languages? The main use of monads appears to be for threading state, particularly IO, albeit there are other varieties.

> Haskell has an active userbase and community; that it is useful is a given.

You can make anything useful with enough effort (hi, Java, C++!); popularity isn't an ideal metric. I'm more interested in the amount of leverage a language gives: how much can you achieve on an arbitrary task given a fixed amount of time?

I believe type inference is a win here -- and I'm looking forward to the results of the recent interest in gradual typing and universal types. I have my doubts about default lazy evaluation though. It's not just IO, there appear to be problems with reasoning about the size of the live set.

> Some programs cannot be written that are completely referentially transparent, yes.

Almost all can't be. On the user-side they're obviously not, and even on the server they're usually not either (network IO, file IO, DB). This leaves problems that are embarrassingly parallel in nature (rendering, sequencing, encoding and the ilk), which are relatively uncommon. So I wonder if we're not trying to fit a square peg in a round hole.

Of course, I admit that this is a bit of a red herring: as you imply, a better question might be the relative amount of necessary pure to impure code. Your typical video compression utility is mostly algorithmic, even if it needs to access the file system from time to time.

> I am not sure how to interpret this remark.

The language appears to fight its adherents. Witness the debate over monad transforms. Instead of solving external problems the developers are contorting their brains on how to get their problem to fit the language. Category theory? Egads, that's research all right.

> Perhaps I could forward them to the Haskell mailing list.

They're aware of it, and in far greater depth than I ever will: http://lambda-the-ultimate.org/node/2749#comment-41078

This thread has been closed. You cannot post in this thread any longer.