4 ms·
I love Scheme as much as anybody else, but I’m not convinced that it should be the first introduction to computer science that people have. I think that the goa
by thramp 11y ago
I love Scheme as much as anybody else, but I’m not convinced that it should be the first introduction to computer science that people have. I think that the goals for an intro class is to get people to enjoy programming, not expose them to the raw beauty of Scheme/FP. I sure as shit didn’t appreciate what Scheme offered the first time I learned it.
- jxy 11y agoThe way I see it: the language rules are simple, anyone can understand all in one sitting; yet the language gives you all the materials you need to build different concepts in SC from scratch. The latter point is important to both teaching and learning.
- thramp 11y agoI completely agree with you regarding the simplicity of Scheme! But that’s exactly why I don’t think Scheme should be people’s first introduction to programming. You need to give them friendly abstractions[1] that make them realize what is possible with computing, and only once they get those abstractions, break them down, and show them how the magic is actually implemented. My opinion isn’t pie-in-the-sky theorizing: I know plenty of intelligent people whose first exposure to programming was Scheme, which scared them off into thinking that “they’re not smart enough for programming” or some bullshit like that. When they later tried a language like Python, they weren’t scared off—they were hooked. The whole argument in favor of using Scheme as an introduction to programming seems highly ideological, and not at all informed by how people actually learn how to program. The fact that so many online resources successfully (Codecademy, Coursera, etc.) introduce people to programming using high-level languages is evidence that it works. [1]: I know that all abstractions are leaky, but in the context of an introductory class, they’re not leaky enough.
- pgbovine 11y agoYes, this is one path to getting someone hooked on learning CS, which works for a small percentage of students (myself included). However, most learners are motivated by other ideals beyond intrinsic language purity. This academic book highlights dozens of research studies that go deeper into this fascinating topic: http://www.amazon.com/Learner-Centered-Design-Computing-Education-Human-Centered/dp/1627053514 http://www.amazon.com/Learner-Centered-Design-Computing-Educ...
- bunderbunder 11y ago> the language rules are simple Completely agreed > anyone can understand all in one sitting Goodness gracious, no. At least it sure wasn't as of the last time I TA'd a class that was taught using it (admittedly during the previous millennium). In a typical group, approaching half the students - smart students, this was a fairly selective school - dropped or failed. A huge chunk foundered on figuring out how to do useful things with lists (cons/car/cdr and friends are elegant, but they are also weird). Another huge chunk struggled with let/let*/letrec. And closures weren't very fun for many students, either. The one neat thing I've noticed about Scheme is that, if you get Scheme, then you will have a very solid grasp of how to compose abstractions. I wouldn't be too quick to infer a causal link there, though. It might be that Scheme makes people better at CS. It could just as easily (given those failure rates, possibly more easily) be that Scheme is a filter for identifying people who have a pre-existing knack for the academic side of CS.
- groovy2shoes 11y agoThe biggest utility of Scheme for introductory programming is the same utility that you get from any functional language, really: referential transparency. Transparency enables what SICP calls the "substitution model" of evaluation and application. The nice thing about that, in regards to pedagogy at least, is that it permits programmers to approach evaluation as a simple algebraic term-reduction system. Sit and evaluate an expression by substitution (there's only a handful of rules), and the similarity to solving and reducing algebraic equations will be obvious. This means that students can leverage the existing intuition they've developed for elementary algebra to quickly grok evaluation. Of course, once side-effects are introduced, that substitution model breaks down, and a new one must be picked up. But by then, the students ought to have become reasonably comfortable with the ideas of programming. I often hear smug Lisp weenies bragging about how simple the syntax is , which allows instructors to spend little time on syntactic rules and get at the meat of programming. But I'd argue that the simplicity of the semantics in the absence of side-effects is even more important. Any student with an eighth-grade[1] understanding of elementary algebra will be able to understand program evaluation quickly and easily. As to why Lisp specifically when any referentially transparent language or sublanguage thereof could provide the benefits of the substitution model just as well: try implementing a complete and fully-functional metacircular interpreter in something other than Lisp, as a literate program, in under 40 pages. Now do it again for a lazy version, a nondeterministic version, and a relational (a.k.a. logical, as in logic programming, e.g. Prolog) version. Some argue that a metacircular evaluator really has no business being part of an introductory course, but in my experience it's actually a good way to finally formalize the actual model of evaluation, while at the same time demonstrating that interpreters, compilers, etc. aren't magic black boxes, but actually relatively simple programs (though when I teach the material I like to point out that they can get pretty complex, depending on source/object languages and optimization... let that be a lesson to them!). [1]: This is the name for the educational status of typical twelve-to-thirteen-year-old students in the US.