Friday, January 19 2007 @ 06:43 PM EST Contributed by: jknapka Views: 571
While I'm on Spolsky, who thinks that CS programs ought to teach students things that will actually open their minds and broaden their ideas of computation, I'm reminded of one mind-broadening experience I had recently: Chapter 3 of SICP: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-24.html#%_sec_3.5
This chapter discusses "streams", which are essentially just lazy lists. The notion that any recursive algorithm can be represented as a stream defined in terms of itself took a little getting used to. The section on sequence accelerators blew my mind.
I think SICP is a great book, in part because of stuff like streams, but also because of its whole organization: it takes the reader from a very high-level model of computation (the Scheme language), and ends up at the low level of simulation of a virtual machine (the explicit-control evaluator). This is quite different from a lot of CS texts which begin by talking about machine organization, and end up discussing some half-assed high-level language like Pascal.