14 ms·
Why MIT switched from Scheme to Python
- wensing 18y agoAre they still going to teach Scheme in any other course(s)? Why not teach both? I had the privilege of taking an SICP-based course at the U(C). The brain-stretching is critical, isn't it? Yes, there's a lot of head-slamming that goes into modern development, but that's not really the same thing.
- carterschonwald 18y agoover IAP I heard they did a bootcamp version of the scheme course.
- rosh 18y agothis is the link: http://web.mit.edu/alexmv/6.001/ http://web.mit.edu/alexmv/6.001/
- jerf 18y agoPython may not be a scheme, but it does have what they used to call functional programming, low-grade continuations with the generators, and some other stuff like that. Python may not stuff its academic credentials in your face, but I think it has one of the better balances between what you can use it to teach, and what you must teach to use it. (Referencing the common and IMHO justified complaint that the simplest possible Java program requires rather a lot of stuff to be taught before you fully comprehend it.) Teach Scheme later... or perhaps, fully distinguish between academic and practical by starting with Python to get you going then transitioning to an ML or Haskell later. (That approach has a lot of appeal to me personally, and has the benefit of the student coming out with at least one useful-in-the-industry language (Python) without compromising academic utility very much.)
- silentbicycle 18y agoPython has some issues that can really interfere with doing Scheme-style FP in in it (no tail-call optimization, single-expression-only lambdas, closure/scope problems, general hostility from Guido), but IMHO it's a great general-purpose language, and well suited to teaching, particularly for introducing higher-order functions. Lua has much more Scheme influence than Python does (while being otherwise pretty similar). Its design assumes proficiency with C, however, so, while very practical, it's probably not as good a language for people new to programming.
- jerf 18y agoYeah, that's why I called it "what they used to call functional programming". Functions are first-class values and closures are easy to get at. (Some people quibble with the exact implementation, but they are definitely there. Such people will be happier with Python 3.0, but still not entirely satisfied.) This is what "functional programming" used to mean. Now it means having immutable values, tail recursion, easy lambdas, powerful type systems, and so on. There's a clear historical progression from past to present, but there's still been changes in what the term means over time which means that different people mean different things by "functional programming" if they don't clarify.
- silentbicycle 18y agoAgreed. I originally said "lisp-style", but changed it to "scheme-style" for just that reason.
- abecedarius 18y agoI didn't miss tail-call optimization much when I studied SICP using XLisp back in the 80s (with 640kb of memory) -- only a couple exercises blew the stack and made me add a while loop. Of course it matters more for real programming on real data, and I agree with your comment generally.
- trjordan 18y agoI think there's something else here, implicit in Sussman's comment, that's important. MIT was founded on a philosophy of practicality, and everything else is secondary. If you couple that with the belief that fundamental computer science is the most efficient way to enhance practical software engineering, Scheme was a wonderful choice. Java and C++ may have been more directly practical to software engineers, but they are not good for the field or people pushing the limits of the field - you spent too much time mucking around with their paradigms and idiosyncrasies. Python (and, frankly, a number of the scripting languages-turned-mainstream) combines this clarity of computer science with a practicality that Scheme never had. If you can convey 95% of the basic ideas in Python, and you can also open the door to learning how to deal with 3rd party code, you'd be a fool not to. It was never about programming purity anyway, so there's no reason to mourn the passing of Scheme. It's progress.
- jules 18y ago> If you can convey 95% of the basic ideas in Python But you cannot. Some of the ideas in SICP can nearly be conveyed in Python (like lexical scoping, closures, data types, streams). You'll use built-in language features in Python (classes, generators) instead of implementing the functionality. I think that implementing these things is important if you want to really understand them. An example, cons, car and cdr from nothing at all: (define (cons a b) (lambda (f) (f a b))) (define (car p) (p (lambda (a b) a))) (define (cdr p) (p (lambda (a b) b))) You can do this in Python in theory, but you can't throw this into a Python course. Other ideas, like interpreters, require a lot of effort. Try writing a metacircular interpreter!
- sharkbrainguy 18y agodef cons(a, b): return lambda f: f(a, b) def car(p): return p(lambda a,b: a) def cdr(p): return p(lambda a,b: b) As well as in theory you can do this in practice. It's about as elegant (hard for me to judge as I have a strong pro-lisp bias). Aside from lack of tail safety and performance issues with writing scheme-ish code I don't see why you couldn't implement those things in Python. The main difference is that typically in a real world situation you wouldn't because there's a library or a language feature
- alecco 18y agoBlog spam. It is a huge quote from this: http://wingolog.org/archives/2009/03/24/international-lisp-conference-day-two http://wingolog.org/archives/2009/03/24/international-lisp-c...
- gojomo 18y agoPulling a meaningful, discretely discussable quote from another place isn't necessarily 'blog spam'. Sussman's rationale for the change in 6.001's focus and language is more interesting to me than anything else in the 'international lisp conference -- day 2' post, and is hidden near the bottom of that post. So, the pull quote blog item adds finding/filtering value for me, which is the opposite of spam. Neither the blogger nor submitter deserves the implication they are a spammer.
- eob 18y agoI'm a PhD student at MIT and arrived to my office on Monday to find the International Lisp Conference had set up shop downstairs. Let me just tell you.. I've never seen so many bearded people in one place!
- grinich 18y agoI noticed this too. In one of the admissions tour groups passing by, I heard the guide comment that it was probably a Literature convention. So I suppose beards either mean lit gurus or lisp hackers.
- time_management 18y agoI wonder, if the switch had been made now, it they would have switched to Clojure instead of Python. It's a lot closer to Scheme, and its connection to the JVM gives it a lot of practical power. Does anyone have any thoughts on this?
- tlb 18y agoPeople often say that Java has great libraries, but is it true? AWT is crufty and ugly. Maybe there are impressive XML parsers (Xerxes is 188,000 lines of Java!), but I don't want those. Numerical libraries seem bad. So what is the library that might convince me to use Java for something?
- acdha 18y ago"The" library is which ever squirrelly database, file format, app, etc. your next project needs to talk to which doesn't have bindings for your favorite language. You compromise on Java to avoid writing that by hand and use a JVM language to avoid the pain of actually using Java.
- tlb 18y agoSuch as??? Can anyone point to a format I might want to use that has a Java library but no C++ or Python library?
- smallpaul 18y agoA few years ago, I took over maintenance of a Windows program that depended upon a Java component wrapped in COM. With Sun and Microsoft at war, that seemed a bit risky to me. I asked: "why is this Java component in the Windows client app?" The answer was that the server was also implemented in Java and the SOAP libraries were compatible, whereas Microsoft's and Java's were not (at that time). I nearly choked: they chose a "standard" like SOAP and then re-standardized on a particular library (client and server components of it) "for compatibility." So to bring this digression back to relevance, I'll say this: if you already have Java code around, it will be easiest to talk to it from Java. And since Java is the new COBOL, there is a bunch of Java floating around. (but if you need a Java client to talk to a Java server using a "standard" protocol then something is seriously awry somewhere)
- mjtokelly 18y ago"And why Python, then? Well, said Sussman, it probably just had a library already implemented for the robotics interface, that was all." I can confirm this is true. The Python Robotics module (Pyro) inspired MIT's internal library, SoaR, which was developed at first by a highly motivated TA. What does SoaR stand for? Snakes on a Robot, of course.
- tlb 18y agoPyro is great. We don't use it because I started our robotics code base in 2001, but if I were starting from scratch I'd use many pieces of it. I believe the main reason why robotics has progressed so slowly in the last 30 years is that getting the damn hardware and firmware working together takes 90% of the available time and students barely get beyond that. So libraries that abstract away most of that and enable plug-in real-time control modules are going to give the field a huge kick in the pants.
- DavidSJ 18y agoAfter his explanation, I asked Sussman why, if that's the world we now live in, it was a bad choice. He responded: "I didn't say it was bad. I said it would make you sad."
- mitko 18y agoHi, I am MIT student in CS and I took 6.001 (the new course is called 6.01). When I asked the instructor why we are using some language that has almost no practical use, they told me that the reasons are: - it teaches the concepts of the class well - after it one can learn any programming language very easily. I believe both of these to be true. From my point of view the new 6.01 sacrifises depth for breadth. This is part of much bigger change of the ciriculum in MIT. That's why I hurried to take all nice classes before they get destroyed. P.S. I didn't know python untill 2 weeks ago. But I learned in need very fast - definitely having background in different programming languages helps a lot.
- scott_s 18y agoThen you can also take comfort in the fact that Python has enormous practical use.
- asciilifeform 18y agoIt it just me who is seeing a cowardly surrender to cultural decay here? From the renowned Sussman, no less. The glorious MIT of the 1980s and prior appears to be dead. Erased, in fact, without a trace. Consider the following: http://mitpress.mit.edu/catalog/browse/browse.asp?btype=2 http://mitpress.mit.edu/catalog/browse/browse.asp?btype=2 These are the latest releases from MIT press. Among them you will find nothing remotely like SICP, but plenty of postmodernist/related pablum. "You have to do basic science on your libraries to see how they work, trying out different inputs and seeing how the code reacts." Is this not an atrocity, to be fought to the last bullet? Is this not an argument for declaring all existing software obsolete and starting from scratch? Why are we - even luminaries like Sussman - so willing to give up on the future without a fight? As argued in some of PG's essays, in order for creativity to bear fruit it is not enough for a given individual to possess a creative mind. The culture has to be hospitable to creativity. And there are processes which come close to stamping out creativity without any overt or deliberate suppression involved. Specifically, a transition to a medium where one cannot get reliable, understandable "small parts" having predictable behavior. Take note: http://xkcd.com/298/ http://xkcd.com/298/ Programmers have indeed created a universe where "science doesn't work." Learning where the permanent bugs and workarounds are inside a phonebook-length API teaches you nothing. It is anti-knowledge. Where your mind could have instead held something lastingly useful or truly beautiful, there is now garbage. There is no longer a "what you see is all there is" Commodore 64 for kids to play with: http://www.loper-os.org/?p=16 http://www.loper-os.org/?p=16 No one is working on, or sees the need for a replacement. This is just as well, considering as one would have to start from bare silicon - and avoid the use of design tools built on the decaying crud of the past. Only a raving lunatic would dare contemplate it... Outside of programming: Linus Pauling developed an interest in chemistry by experimenting incessantly throughout his childhood. Today, he would have been imprisoned: http://memepunks.blogspot.com/2006/06/americas-war-on-science.html http://memepunks.blogspot.com/2006/06/americas-war-on-scienc... The new generation will have no Linus Pauling, unless the Third World - where one might still purchase a beaker without a license - supplies us with one. Likewise, we will see very few truly creative programmers. What creativity can there be when your medium is shit mixed with sawdust?
- sethg 18y ago
- grinich 18y agoI'm a sophomore at MIT and took 6.01 last term. I think a lot of people don't understand the goals of this course. 6.01 is not meant to be a crash-course in writing code. (6.005, know as "java deathlab" is for that.) Likewise, it's not designed to reveal the deep inner workings of computers. Instead, it's mean to be an introduction in how to /think/ with computers. It's conceptually more high-level, and often focuses on the "why" rather than the "what." We learn how to approach problems and look at the best ways to solve them using logic and code. Python is visually clear, has great documentation, is well maintained, and has an active community of developers. I don't understand the outrage in switching. I didn't learn to drive in an obscure European sportscar; I learned in my mom's minivan. Python is like my mom's minivan, but with better documentation. I don't think the caliber of CS grads coming out of MIT in the next few years will change because they know Python, although it'd be an interesting thing to look at. # Here's the course website, if you'd like to look closer: http://mit.edu/6.01/mercurial/spring09/www/index.html http://mit.edu/6.01/mercurial/spring09/www/index.html
- lyriendel 18y agoI was a TA for 6.01 two years ago. 6.01 and 6.02 (Intro to EECS II, may have replaced 6.001 and 6.002, but their purposes are fundamentally different, as someone else mentioned earlier. They're now both introductions to a wide range of CS topics--6.01 covers not just software engineering, but feedback and control, circuits, and probability and planning; 6.02 covers things like signal processing, digital logic, and networking. Good computer scientists nowadays need to (or at least should) know so much more than how to write good, clean, modular code. As the 6.01 FAQ says, they still teach software abstraction ideas including functional programming, higher-order functions, and object-oriented programming. They chose Python mostly because Python is easily approachable. But most of 'modernizing' 6.001 isn't about moving from scheme to Python--it's focusing on learning how to modularize/abstract and model/analyze across a variety of different contexts (not just software, but linear systems, circuits, and AI). Also, 6.01 actually assumes that you have some programming experience already. When I TAed, at least, we assumed working knowledge of basic Python from week 1 and told people to go read a Python tutorial/book if they didn't have such. If you don't know how to program at all, you're supposed to take 6.00 first, which is the real 'Introduction to Programming' course. Except that most people skip it because they already know how to program or think they can learn on their own (and because it's kind of seen as a remedial course, which is especially unfortunate for people who really don't know how to program already--6.01 is pretty harsh if you've never programmed before).
- screwperman 18y agoI read SICP when I was 14; this was a couple of years after I came across some pg/Lisp stuff. It would be absurd if MIT CS students remain ignorant of 6.001 given their institute's really hardcore hacker culture. Hence, I fail to see what this entire fuss is all about.