Hacker News new | past | comments | ask | show | jobs | submit login
Simon Peyton-Jones - A Taste of Haskell (ontwik.com)
87 points by ahmicro on April 11, 2011 | hide | past | favorite | 24 comments



I just never get tired of watching SPJ talk. He has an amazing ability to explain complex ideas in a meaningful way, not to mention his obvious natural enthusiasm for the subject.

It's also great to attend any talk where he's in the audience, because he always finds a way to ask questions which intentionally create opportunities for the speaker to look better by diving off into some interesting subtopic or area of technical detail that they've overlooked. A real talent.


SPJ also writes amazing papers. He always has a novel, practical idea, and he explains it clearly. For example, here's a paper he co-authored on Software Transactional Memory in Haskell:

http://research.microsoft.com/en-us/um/people/simonpj/papers...

Notice the care taken to explain why STM is important, and its advantages over traditional locking (ease of use and composability). There's also two great new theoretical tidbits in this paper, the 'retry' and 'orElse' operators, which significantly expand the power of STM.

SPJ's good example has filtered throughout most of the Haskell community by now. I love programming in Haskell because it gives me an excuse to read these really cool papers (and it stretches my brain until I understand them).


Yes, Haskell's such an awesome language only partly because of the cool technology. The community and its leaders are the real secret sauce.


This was great. I just wished that more in-depth articles like this one would rise to the top just as much.

http://news.ycombinator.com/item?id=2429082

ML may have lost the war, but from an academic and educational standpoint, folks in the ML community still have a lot to bring to the table.


Reports of ML's demise are somewhat premature. Now we call it F#...


Isn't that kinda like saying the C language still lives on in the form of Java?


Well, no. Because the distance, especially the idiomatic distance, between C and Java is much more than the distance between F# and Ocaml. The core languages of both are essentially equivalent. Ocaml and F# have diverged a fair bit in their fringes/exotic features (I can go into this in more detail) but if the bulk of your code use the more humdrum features then going between the two is trivial.

A more apt analogy would be to consider two languages that extend C in different ways but for which the core of C can be used in both with almost no modification (D & C++?). I suppose a python/jython/ironpython comparison would be more accurate.

p.s. with respect to grandparent, I don't subscribe to the philosophy of casting everything in terms of winner take all wars.


Though I'm not sure the SML people would agree...


I wonder if there'll be any effect from the fact that ML is now going to be the language used in CMU's intro CS course. They produce quite a few CS students, so there will be a cohort with at least basic familiarity with ML.


I play around with Haskell quite a bit, but not so much ML. Do you know why ML won out at CMU?

I'm reading Cousineau's "The Functional Approach to Programming", which is based on ML, and I end up just translating most things into Haskell--the syntax feels much cleaner to me.


Do you know why ML won out at CMU?

As far as research goes, CMU and Princeton are (as far as I know) the two ML strongholds in the US, with functional-programming research at most other departments dominated by Haskell. So I imagine the faculty were in favor of ML. The new course (http://www.cs.cmu.edu/~15150/) is being taught by Robert Harper, author of the book Programming in Standard ML (http://www.cs.cmu.edu/~rwh/introsml/).


"Haskell is the world's leading purely functional programming language"

Why do people have to write stuff like this? What is "leading" and why would that be important?

And, BTW, I am quite sure there is a lot more Erlang code running on phone centrals around the planet than Haskell code.


Haskell is the language in which the lion's share of pure functional programming language research is done. So it is "leading" in the sense of "being the first place new ideas are tried".


> Haskell is the language in which the lion's share

But also more popular on:

* Tiobe; GitHub; Reddit; Transparent Language Rankings; IRC; Workshop size; Number of libraries...

Community matters.


Isn't this a little too marketing-ish way to describe a language that dominates the small niche of purely functional programming languages?

I agree Haskell is important, but so is objectivity. Marketing spin gets in the way.


Erlang is not purely functional.


We could also say it's the leading FP language that starts with "H"...


Haskell is a purely functional language in this sense.

http://en.wikipedia.org/wiki/Pure_function

http://en.wikipedia.org/wiki/Purely_functional

Haskell has taken functional purity and ran with it. It's proof that you can eliminate side effects (sans the sin bin) and still actually get things done. The benefits of this can be seen in the papers written by SPJ, Wadler, etc. Moreover some features from Haskell/FP have influenced the mainstream programming community (Java generics).

As far as I know Erlang is not purely functional, nor does it try to be. On top of that, I think Erlang's emphasis is more on the actor model / message passing than it is on functional programming. That's my take at least.


We could, but we didn't.


Obviously I underestimated the huge importance of being purely functional.

What other purely functional languages compete for Haskell's attention share?


E.g. Clean. And perhaps Curry. (Though Curry is logical-functional and nowadays compiles down to Haskell.)

There are also Spreadsheets, which are also purely functional, and even more popular to say the least but not leading. (The problem is that you can not define your own functions in Spreadsheets (without using imperative languages like Visual Basic).)


I would love a spreadsheet where the functions could be written in Lisp (or something less dysfunctional than spreadsheetese). And also one where a cell could contain any value (range of cells, functions...)



Miranda, Clean, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: