Earlier quoted context omitted.
Pedagogically speaking, I think this is backwards. SICP isn't a course in functional programming; it's a course in programming. And the use of Scheme is critical, because it doesn't waste time on nonsense like classes and structs and other ephemera -- you just jump right into the conversation with the computer.
When I went to Berkeley, those with no programming experience were encouraged to take CS 3 (Simply Scheme) before taking CS 61A (SICP).
Why SICP Matters
41–50 of 130 posts
Re: Why SICP Matters
#42But an average student might need the exposure to other "common" paradigms from C, Python, or Java, before getting introduced to SICP, to "fully appreciate" the power of functional language.
Pedagogically speaking, I think this is backwards. SICP isn't a course in functional programming; it's a course in programming. And the use of Scheme is critical, because it doesn't waste time on nonsense like classes and structs and other ephemera -- you just jump right into the conversation with the computer.
Re: Why SICP Matters
#43Earlier quoted context omitted.
> I have only skimmed so far For the mind-blowing effect to occur, you must actually do the exercises. (-:
Yes, agreed, if you are reading this book, don't skip the exercises! You might need to refresh some math skills (just a bit), but it is worth it.
Re: Why SICP Matters
#44But an average student might need the exposure to other "common" paradigms from C, Python, or Java, before getting introduced to SICP, to "fully appreciate" the power of functional language.
Pedagogically speaking, I think this is backwards. SICP isn't a course in functional programming; it's a course in programming. And the use of Scheme is critical, because it doesn't waste time on nonsense like classes and structs and other ephemera -- you just jump right into the conversation with the computer.
Re: Why SICP Matters
#45Earlier quoted context omitted.
"Scheme has a lot of parenthesis that makes it look very old fashion." Might I argue that this is a huge advantage? No one knows scheme, and it's very obscure, and looks nothing like other programming languages. This means that you can teach concepts using it and pre-judgements about the language don't get in the way. Then, I suppose the same could be said of CAML and its obscurity.
Which one is obscure ? define factorial (lambda (n) (if (= n 0) 1 (* n (factorial (- n 1)))))) let rec fact = function | 0 -> 1 | n -> n * fact (n - 1);; There is a little more syntax to learn in caml, but the suppression of 90% of the parenthesis makes the code far easier to read.
http://img1.imagilive.com/0413/scheme-fact.png
You could even simplify it a little by getting rid of the lambda:
http://img1.imagilive.com/0413/scheme-fact2.png
In any case, I find toy examples like this less than convincing. In real-world programs, issues of style, design, and documentation usually trump most anything else, as far as clarity is concerned.
Also, I personally find the penchant for one-letter variable names in the OCaml/SML/Haskell world to be very confusing and obfuscating.
The Scheme way is to be more verbose and explicit. For me, that results in much greater clarity -- especially when looking at unfamiliar code or code that you've stepped away from for a few months.
Of course, there also such a thing as being too verbose and explicit. But for me, Scheme is in the sweet spot between verbosity and terseness.
Re: Why SICP Matters
#46`How to design programmes' (http://www.htdp.org/) leaves a better impression as a beginners' book for me.
If you can already programme then "Programming Languages: Application and Interpretation" (http://cs.brown.edu/courses/cs173/2012/book/) is a great follow-up.
Re: Why SICP Matters
#47When I was student, my school has decided to stop using Ada as teaching language. They were hesitating between CAML Light and Scheme. They asked me my feeling because I was one of the rare student to know well both of them. I like both of them, but I choose CAML Light. Scheme has a lot of parenthesis that makes it look very old fashion. Scheme type system was also outdated. Programming in CAML Light was more fun for…
Dynamic typing is outdated?!
I have some professional experience in rewriting Python and Ruby programmes in Haskell. I make the same amount of stupid mistakes in Python as in Haskell. But whereas Python blows up at runtime / test time, in Haskell it's the compiler yelling at me. The nice thing: that's much faster to detect, and also saves me writing about half the tests.
Don't get me wrong, dynamic typing beats inane static typing like C's or Java's. But good static typing beats dynamic typing.
Re: Why SICP Matters
#48Re: Why SICP Matters
#49Universities are communities of people from very different sub-disciplines, with every person considering their own sub-discipline or course the most important one, and as a result the curriculum is diluted and hurried to please the greatest amount of people. It might have its benefits, but if training great computer scientists is really the goal, I think it is a bit of a pity you cannot go to a place where you could…
Re: Why SICP Matters
#50Earlier quoted context omitted.
Dynamic typing is outdated?!
Yes, since at least 80s or so. Languages based on Hindley-Milner type system ( https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner ) are static and nice to work with. E.g. OCaml or Haskell. I have some professional experience in rewriting Python and Ruby programmes in Haskell. I make the same amount of stupid mistakes in Python as in Haskell. But whereas Python blows up at runtime / test time, in Haskell it's the co…
I like the final result of safety, and how whole classes of bugs are excluded once I get my OCaml program to compile. But the process of getting my program to compile in the first place is pretty painful and not fun.
Then again, writing endless unit tests in a dynamically typed language like Scheme is not much fun either. But I don't have to write the unit tests until I've written some functional portion of my program (or even the whole thing) and am satisfied with its design and how it works. Then I could add unit tests or even rewrite it in a safe language like OCaml, if I wanted to.
As I said elsewhere in this thread, for fast prototyping and sheer pleasure of programming, I find Scheme very hard to beat.