Live data from Hacker News

Why Not Haskell?

neugierig.org

21–30 of 134 posts

Re: Why Not Haskell?

#21
In the end the author seems to be using Go for a lot more development. Are people here finding it to be a good solution? It seems like it might be the language that could bridge the iOS and Android systems for app development.

Re: Why Not Haskell?

#22
I've only written two notable haskell programs.

One (git-annex) is a large-ish, serious work, and I have been very pleased with how haskell has made it better, even though there was a learning curve (took me two weeks to write the first prototype, which I could have probably dashed off in perl in two days), and even though I have occasionally been blocked by the type system or something and had to do more work. One concrete thing I've noticed is that this is the only program where I have listed every single bug I fixed in the changelog -- because there have been so few, it's really a notable change to fix one!

My other haskell program was essentially a one-off peice of code, which converted ten years of usenet posts from the 80's into "modern" usenet posts. At that point I was over the learning curve, so I wrote it as fast, or possibly faster than I would have written the equivilant in perl, banging out a 800 lines of code in 12 hours or so. And the code is clean, pure, and even has reusable modules, which would never have happened with any other language I've used. And it all worked the first time. Converting the entire known corpus of A news articles to B news, and from there to C news, with success on the first try is an amazing feeling.

I'm going to be sticking with haskell. I do worry that some of my haskell code may need fiddling to keep working for 5 or 10 years though.

Re: Why Not Haskell?

#23
post #18
post #15

I agree with the author, but for different reasons. I think Haskell suffers from a "network effects" problem. It's not made for real world use cases because nobody is using it for the real world. And guess what? To get it adopted in the real world, it needs to support real world use cases. I think that Haskell is doomed to a life of being a research toy language for the simple reason that that's what people are using…

Haskell has some notoriety in the financial industry. Obviously the language isn't used as extensively as, say C++ in commercial applications, but to go to such extremes as saying "nobody" uses it is plain wrong.

[deleted]

Re: Why Not Haskell?

#24
post #20
post #17

I've been spending time learning Haskell lately, as part of an investigation into tools which are amenable to static analysis at work. To learn about the situation, I've put together similar programs in Lisp, OCaml, and Haskell, as well as installed compilers for Haskell & Ocaml on the PPC. Well - I've coded for over a decade, and I've never encountered such a difficult to use language and jargony community & documen…

The REPL is not identical to the compiler. This means that you can't trust the REPL. Coming from Python and Lisp, that is a pain. I can't agree more. This is by far my biggest issue with Haskell. It would be so much easier to learn the language if you didn't have to learn the REPL separately from the language proper.

This problem with the repl is actually going to disappear in the next ghc release (7.4.*). In particular, as of that ghc release you'll be able to interactively define types and functions (both!) in the repl.

Re: Why Not Haskell?

#25
I've been doing a whole lot of scientific Python lately, and every time I let my program run for like an hour only to crash on an array of the wrong dimensions, or pass in a scalar where an array is expected or vice versa, I swear and wish I was using a strongly typed language like Haskell. If only it had the same tools as SciPy I'd be all over doing my scientific work in Haskell. (Not to mention it would have faster run times.)

(There are a few array libraries, but I'm pretty sure nothing as complete as NumPy+SciPy+matplotlib exists for Haskell..)

Re: Why Not Haskell?

#26
post #20
post #17

I've been spending time learning Haskell lately, as part of an investigation into tools which are amenable to static analysis at work. To learn about the situation, I've put together similar programs in Lisp, OCaml, and Haskell, as well as installed compilers for Haskell & Ocaml on the PPC. Well - I've coded for over a decade, and I've never encountered such a difficult to use language and jargony community & documen…

The REPL is not identical to the compiler. This means that you can't trust the REPL. Coming from Python and Lisp, that is a pain. I can't agree more. This is by far my biggest issue with Haskell. It would be so much easier to learn the language if you didn't have to learn the REPL separately from the language proper.

Help is on the way. Support for accepting all top-level declarations in GHCi has been recently added to GHC HEAD: http://www.reddit.com/r/haskell/comments/kmxf2/ghci_now_supp...

Re: Why Not Haskell?

#27
post #15

I agree with the author, but for different reasons. I think Haskell suffers from a "network effects" problem. It's not made for real world use cases because nobody is using it for the real world. And guess what? To get it adopted in the real world, it needs to support real world use cases. I think that Haskell is doomed to a life of being a research toy language for the simple reason that that's what people are using…

Have you seen all the libraries up on Hackage? Haskell probably has way more real-world stuff than you think.

Re: Why Not Haskell?

#28
I'm learning Haskell right now. It's the most recent language I've decided to pick up since R back in 2006. Despite dabbling in Lisp about a decade ago, and the functional flavoring of R, it's been a pretty difficult ride. However, it's definitely teaching me to think about writing programs in a very different way.

I can attest to the painfulness of the IO monad. I still haven't gotten it fully. The error messages are also fairly cryptic. The first program I wrote was about 15 lines and it took me about 4 hours of time. But it worked flawlessly and efficiently. The difficulties notwithstanding, this is probably the most fun I've had learning a language ever.

Re: Why Not Haskell?

#29
There was recently a survey on the State of Haskell in 2011 [1]. As many people here seem to be echoing, OCaml was the main possible "replacement language". Also included in the survey are ratings of various aspects of Hackage and also Haskell libraries in general.

It was a really interesting read. I made a follow-up post [2] that analyzed the free-form responses to the last question, "What do you think is Haskell's most glaring weakness / blind spot / problem?".

Number one by far was libraries (spread across: quality + quantity, library documentation, Hackage, cabal). There are a lot of people working on this though, and progress is being made.

The runners up were 'Tools', and 'Barrier To Entry'.

I think Haskell, at the very least, is a fantastic way to learn some different ways of thinking and good habits. The (little so far) coding in it I've done has been very enjoyable for me, but I don't expect everyone to feel the same way.

It has a very warm community, and a fair bit of momentum. As time goes on I predict (and hope) it will become more viable for a greater number of people to use.

[1] - http://blog.johantibell.com/2011/08/results-from-state-of-ha...

[2] - http://nickknowlson.com/blog/2011/09/12/haskell-survey-categ...

Re: Why Not Haskell?

#30
post #15

I agree with the author, but for different reasons. I think Haskell suffers from a "network effects" problem. It's not made for real world use cases because nobody is using it for the real world. And guess what? To get it adopted in the real world, it needs to support real world use cases. I think that Haskell is doomed to a life of being a research toy language for the simple reason that that's what people are using…

I think we're actually just on the verge of the real world network effects starting to kick in. Technically, Haskell is something like 20 years old, but it reminds me in practice of how Python felt when I first came to it in the 1.5.2 era; promising, but missing a lot of infrastructure. It's starting to come in, though. The recent work on performant bytestrings and text representations was one big stopper, and the web frameworks for Haskell are, well, for one thing plural now, which is a nice sign, and many are improving rapidly.

If you're interested but unsure, you might take a look around but I don't feel all that guilty suggesting waiting another year or two.

Post reply on HN