[plt-scheme] Re: from hell to paradise

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Tue Feb 17 20:00:35 EST 2009

Grant Rettke wrote:

> Also Peter Siebel's
> "Practical Common Lisp" or the "Real World Haskell" book are what
> people want to see so they feel like they are "doing something
> valuable" with what they learn. I don't see that in the FP world.

I'm confused -- those books are in the FP world. Do you want something 
like them for Scheme? I would point to the v4 documentation, already an 
order of magnitude better than that for any comparable tool. I expect it 
to get better. (If HtDP were a wiki, it would be transformed by now.)

> Another example is showing the value of "pure functional programming".
> Other than HtDP, I have yet to be able to find a book that teaches how
> to, and the value of, designing purely functional programs. I have
> asked just about everyone I could find and there is still only one
> that I can point too.

In Scheme, no, though I would say that TSPL doesn't make a big deal of 
mutation, and neither does Paulson's "ML For The Working Programmer". 
But what about Hutton's "Programming in Haskell", or Hudak's "The 
Haskell School of Expression", or Okasaki's "Purely Functional Data 
Structures", or Rabhi and Lapalme's "Algorithms: A Functional 
Programming Approach"?

Perhaps I can draw an analogy with environmentalism. After some alarming 
discoveries in the '60's and '70's, governments gradually regulated (at 
least in North America) the more extreme violations. But individual 
responsibility took much longer to sink in. There was a school of 
thought that suggested making it easier for people by making it 
familiar, which brought us trash separated at the dump instead of at 
collection point, hybrid SUVs, etc. But these were just stopgaps. What 
was really required was a change in thinking, and that happened among 
the young. We're not there yet, but it looks a lot better than it did a 
decade or two ago.

As a student, I went out into summer workplaces and argued for 
structured programming against senior programmers who insisted on their 
right to GOTO any label they put in their code, for the use of Pascal 
and C instead of FORTRAN and COBOL, for the use of Unix instead of 
whatever IBM was offering. I didn't make much headway, but there were 
thousands like me, and collectively we had an effect. We were shown a 
new way to think, and we made that the norm.

It can happen again, though -- I believe -- not if we make do with only 
the students who are not repulsed by their high-school CS labs (or by 
their image, never getting anywhere near the labs themselves) or who are 
primarily driven by the video games they have enjoyed. We need also to 
reach the best math and science students -- and the best philosophy and 
political science and English students, because they can look 
objectively at a piece of C++ code and a piece of Scheme code and come 
to the obvious conclusion, the one resisted by those who believe, in 
defiance of most of human history, that the way things are done now is 
the way they will always be done. --PR

Posted on the users mailing list.