News for hackers. Stuff that matters.
Re:Dijkstra on Haskell and Java (2001) by asdasf on Wednesday January 08, 2014 @10:42AM (#7024133)
>Personally, I see Haskell as the C++ of functional language

You should try it some day, it is absolutely nothing like your misconceptions.

Re:Dijkstra on Haskell and Java (2001) by CJefferson on Wednesday January 08, 2014 @01:32PM (#7025437)
I have written quite a bit of Haskell, I'm not sure what you think is wrong with my belief. Also, I like C++ :)

Both are fairly big complex languages with horrible error messages, horrible compile times (if you use template haskell in particular), with a whole bunch of gotchas you have to learn to get good performance (the haskell gotchas are very different, and often based around lazy evaluation / memory bloat). Both have sharp edges that come from being old languages which have evolved over time.

However, both languages are good in practice for actually getting things done.

Re:Dijkstra on Haskell and Java (2001) by asdasf on Wednesday January 08, 2014 @02:35PM (#7025920)
>I have written quite a bit of Haskell

That is a very common claim from people posting misconceptions that could only arise from second-hand info and a lack of direct experience. I have a very hard time believing it given that you claim haskell is large and complex.

>Also, I like C++ :)

I won't hold that against you.

>what you think is wrong with my belief

Well, everything you just mentioned except the horrible compile times. Haskell is a relatively small language, and is not complex at all. In fact it is quite simple, and very consistent. I don't know what you mean about horrible error messages, and you do not need to learn any gotchas to get good performance. What you need to learn is very simple, very clearly spelled out in the docs, and is no more than you need to learn in any other language. Avoiding unnecessary laziness is no more difficult than avoiding unnecessary strictness. I can't think of a single "sharp edge" haskell has, I suspect we must have different ideas of what a sharp edge is.

Re:Dijkstra on Haskell and Java (2001) by CJefferson on Wednesday January 08, 2014 @04:04PM (#7026611)
> That is a very common claim from people posting misconceptions that could only arise from second-hand info and a lack of direct experience.

Do you think that I, and an apparently large number of other people on the internet, spend our time insulting Haskell without having used it? That some great anti-Haskell conspiracy is being waged by evil groups unknown?

I haven't written large enough Haskell programs to have performance problems myself, but I work with people who have. People who have to keep an empty monad around because removing it doubles the run-time of the program, and make substansal changes to get programs into an acceptable (<16GB) amount of memory. Also, there are plenty of horrible error messages. Having a random google, here's the first one that comes up. While I can just about figure out what it means, it is several levels more complex than anything that would ever come out of Java. Stackoverflow is full of Haskell questions which are "I don't understand this compile-time error I am getting".

http://www.haskell.org/pipermail/haskell-cafe/2008-August/04...

Re:Dijkstra on Haskell and Java (2001) by the_af on Wednesday January 08, 2014 @07:46PM (#7027988)
> People who have to keep an empty monad around because removing it doubles the run-time of the program

I'm genuinely interested in this. Can you link to an article or blog post explaining the problem? Thanks! :)

Re:Dijkstra on Haskell and Java (2001) by CJefferson on Thursday January 09, 2014 @10:39AM (#7031026)
It was a PhD student's program, but the problem was verified by more than one knowledgable Haskell programmer. I'll see if I can get them to write it up somewhere!
Re:Dijkstra on Haskell and Java (2001) by asdasf on Thursday January 09, 2014 @12:03PM (#7031592)
>Do you think that I, and an apparently large number of other people on the internet, spend our time insulting Haskell without having used it? That some great anti-Haskell conspiracy is being waged by evil groups unknown?

No, it seems like a relatively small group. And I did not suggest ill intentions, merely ignorance. Do you seriously think "some people repeat second hand info about topics they lack experience with" requires a "great conspiracy waged by evil groups unknown"?

>I haven't written large enough Haskell programs to have performance problems myself

So, you are confirming exactly what I said, that you don't have experience and are repeating second hand info. Why then did you feel the need to invent some sort of conspiracy theory nonsense as a rationale for your behavior?

>People who have to keep an empty monad around because removing it doubles the run-time of the program

That statement demonstrates such an obvious lack of understanding that I am almost able to believe you are ill intentioned. That makes absolutely no sense, it is like me saying "C is bad because I have to keep an empty function around or it doubles run time".

>make substansal changes to get programs into an acceptable (<16GB) amount of memory

That is too vague to be meaningful. Were they working with >16GB of data? Did they just have a memory leak? Do you understand that memory leaks can be created in every language?

>Also, there are plenty of horrible error messages. Having a random google, here's the first one that comes up

Are you trolling? That is a trivially simple error message. It is a simple type mismatch, the compiler expected X, it got Y. Which is precisely what it says.

>Stackoverflow is full of Haskell questions which are "I don't understand this compile-time error I am getting".

Stackoverflow is full of everylanguage questions of "I don't understand this error I am getting". That is completely meaningless.

Re:Dijkstra on Haskell and Java (2001) by dded on Wednesday January 08, 2014 @11:24AM (#7024452)
Haskell is a relatively difficult language to try. Introductions and books almost seem to expect you to understand the syntax when you begin. And I/O is introduced late, which makes it hard to play around with.
Re:Dijkstra on Haskell and Java (2001) by nbouscal on Wednesday January 08, 2014 @12:47PM (#7025057)
Learn You a Haskell is an excellent introductory text and I see no way in which it "expect[s] you to understand the syntax when you begin." It walks you through things very explicitly. Yes, IO is introduced late, but it is not necessary for playing around with the language. IO is only necessary for play in languages that don't have a REPL.
Re:Dijkstra on Haskell and Java (2001) by asdasf on Wednesday January 08, 2014 @02:08PM (#7025717)
I think you are forgetting that everyone who uses haskell has obviously gone through the trying it stage. It is not that hard, I did it. I just had a couple of PHP programmers do it without any problems. LYAH assumes you know very little, and explains things very simply. It gets to IO plenty quick enough, and before that it is showing you how to play around in ghci where you don't need to care about IO.