5 ms·
Structure and Interpretation of Computer Programs
- eru 18y agoPhilip Wadler wrote an interesting critique of this classic computer science text: http://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.pdf http://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.p...
- rtf 18y agoIn large part the critiques seem to center around failings of minimal prefix syntax(failings which I would agree with). Minor errors that in bulkier languages are caught by the compiler, become logic errors in a Lisp; an easy way to become frustrated as a learner.
- michaelneale 18y ago>Minor errors that in bulkier languages are caught by the compiler, become logic errors in a Lisp doesn't that apply to any less static -> more static typed language comparison?
- etal 18y agoIt's interesting how the PLT team dealt with this teaching problem in "How to Design Programs". The first part basically shows how to write simple Java-like code with Scheme syntax, using symbols and fixed records, and including tests as part of a complete program. Then in the later sections, lists and the more dynamic handling of data are introduced gradually. Aren't PLT Scheme structures way more complicated than lists? Yes, but since simple errors show up sooner with a struct, it seems to be a better way to teach brand-new programming students how to work with compound data.
- ced 18y agoThat was interesting. I have a question though. Lazy languages are simpler to deal with for strictly functional data... But what about side-effects? Is the pain of a monad less than the pain of explaining to a student that (defun if (then else) ...) doesn't work? I don't have experience with Haskell, can anyone comment? edit: Is there anything better than Lisp macros that makes defining an if possible and that supports side-effects?
- silentbicycle 18y agoYou can use side effects with lazy evaluation, it's just that if you guarantee that you won't, various things suddenly become much easier to do safely (and to optimize for). It's a trade-off. Haskell is lazy by default, but you can also do lazy evaluation in Scheme and OCaml, for example. In Scheme (PLT): (define lazy-with-side-effect (delay (begin (print "Hey, a side effect!") #t))) > lazy-with-side-effect #<promise> > (force lazy-with-side-effect) "Hey, a side effect!"#t > (force lazy-with-side-effect) #t In the OCaml toplevel: # let lwse = lazy (print_string "(Side effect)\n"; true);; val lwse : bool lazy_t = <lazy> # lwse;; - : bool lazy_t = <lazy> # Lazy.force lwse;; (Side effect) - : bool = true # Lazy.force lwse;; - : bool = true
- shankys 18y agoI know both Lisp and Haskell, and I'm pretty sure that Haskell for most people is much harder to learn. The two biggest stumbling blocks people encounter when learning Haskell are monads and the (powerful but complex) type system.
- silentbicycle 18y agoIn my experience, learning OCaml is a good way to become accustomed to the type system Haskell uses without having to also learn how to do everything with functional purity at the same time. The type systems are very similar, though Haskell has type classes and OCaml has a much more elaborate module system.
- chollida1 18y ago> In my experience, learning OCaml is a good way to become accustomed to the type system Haskell uses I'd agree with this. In addition I'd recommend "The Little MLer" as a great book on how to think in terms of types. edit. didn't read further down. Seems as if it is already mentioned:)
- silentbicycle 18y ago
- msie 18y agoI studied Miranda in university. It is a beautiful functional language but it wasn't free as in beer. Then around that time I heard about this free language called Haskell that was similar to Miranda. I stopped using Miranda after my course was over. If it was free I wonder if it would be more popular today.
- michaelneale 18y agoI also did miranda (was my first programming language). My understanding at the time was that it was only intended for research, and as it was pure, there was no way (at the time ) to do real IO - your program was essentially f(user input as string) = output as a string, and not practical enough. Since that time they worked out how to use Monads in haskell for a nicer IO experience. Interesting.
- speek 18y agoif you're at all interested in self-growth, watch this with intensity.
- tdavis 18y agoAgreed. I've watched this series on and off for a few years now and it's always worthwhile.
- campo 18y agoHal Abelson is a smart guy. He does a lot of work concerning law, privacy, and technology, including the internet and mobile devices. You may want to take a look at his book Blown to Bits http://www.bitsbook.com http://www.bitsbook.com
- silentbicycle 18y agoBesides the book itself, are there any transcripts fer these videos? I've watched several of them, but some go by rather slowly. (I know: whine, whine.)
- mixmax 18y agoI've been watching these to get a grasp of lisp, and think they're great - not least because of the amazingly cool retro-look and haircuts of the audience.
- dfox 18y agoThese videos and book are certainly way to get some grasp at LISP, but not especially good way, because what is presented as LISP there is Scheme and it is presented in way that I would call too theoretic and oriented towards pedagogical purposes. And intention of SICP is to teach basics of CS, not LISP or Scheme, Scheme is used only as programming language serving this purpose. And for this purpose it is one of best materials that I've seen. But because of this programming style presented here is significantly different from what is useful for practical purposes. So it will help you as programmer in general, but not as LISP programmer. If you want to learn Common Lisp and especially to use it effectively I would recommend CL-oriented book, for example Practical Common Lisp by Peter Seibel. But still I'm recommending SICP (at least watch the videos) to anyone who indends to be real programmer.
- pavelludiq 18y agoThese videos made me a better python programmer. I wrote a small game in python in a lisp inspired style, and thought it was too lispy and so i tried to rewrite it in scheme, just for comparison. I don't know scheme that much, and because of that, i failed.