4 ms·
Given that JavaScript and Python are very mainstream now, we need some sort of text that covers functional techniques for the average programmer in scripting la
by neilk 15y ago
Given that JavaScript and Python are very mainstream now, we need some sort of text that covers functional techniques for the average programmer in scripting languages. SICP is dated and doesn't really match what modern languages can do.
Mark-Jason Dominus' "Higher-Order Perl" is fantastic, but unfortunately specific to a language that's most programmers are not choosing in 2011. There was an attempt at a JavaScript port. Maybe someone should take that up again.
- spacemanaki 15y ago> SICP is dated and doesn't really match what modern languages can do. I disagree. There's over 200 pages before they even introduce mutation and impure functions. Later they touch on the thorny problems that mutation creates when they touch on concurrent programming. There's sections on building lazy streams which are core parts of Clojure and Haskell. And I don't think there's a more accessible intro compilers and programming languages text than chapters 3 and 4. While there might be other places to learn about functional programming to apply to working in Python and JavaScript, SICP is a fine place to learn the fundamentals. In some ways, I would say modern programming languages are just starting to catch up to SICP. (yes I know Haskell is pretty old, and disclaimer: I'm a huge fan of SICP)
- neilk 15y ago> I disagree. There's over 200 pages before they even introduce mutation and impure functions. That's kind of the point. I tend to be the one defending SICP on this board, but only for someone who wants the very particular kind of education SICP brings. Meanwhile, over in languages people are using, you don't have the option of living without mutation. Time to learn how to protect yourself, or not, with closures. Recursion has a bigger speed and space penalty. You need to tell people when to use maps and folds and when not to. SICP doesn't really do combinators, and they are very useful in JS. Also, a lot of libraries in JS use chaining, so a grounding in their theory (maybe even a discussion of monads à la Haskell) might be very fruitful. SICP has nothing like that. Callbacks are everywhere in JS programming, so a discussion of how to avoid spaghetti would be good. Latency is a much bigger deal for JS -- how to balance very fast local resources with potentially never-returning remote resources -- and techniques for beating that are not to be found in SICP, as far as I remember. And of course there's no discussion at all of UI or media in SICP.
- yvdriess 15y ago> SICP is dated and doesn't really match what modern languages can do. You really need to elaborate on that. Especially given how Guido could have used reading SICP when implementing Python and how Brendon was thoroughly inspired by Scheme (and I assume SICP) for Javascript.
- Pedrom 15y ago> SICP is dated and doesn't really match what modern languages can do. I always think SICP as math applied to CS and math never gets old :) I am reading it after 9 years as a professional programmer and I am having so much fun! It is giving me new ways (o reminding me forgotten ways because my first language was Scheme) to think about problems and I am totally using those skills in my job. I will recommend SICP to any beginner that wants to become a serious programmer, maybe not because the language and programming style but the way it teaches how to attack problems. Sometimes the journey is more important than the destination :)