文章摘要
MIT将编程入门课程从Scheme转向Python,主要因为工程领域的变化。1980年代程序员需深入思考并编写简洁代码,而到2000年代,工程更注重构建复杂系统,Python的易用性和广泛库支持更适合现代需求。
文章总结
MIT为何从Scheme转向Python
2009年,麻省理工学院(MIT)决定将其入门编程课程6.001的教学语言从Scheme改为Python。这一决定引发了广泛的讨论。根据MIT教授Gerald Sussman的解释,这一转变反映了编程环境的变化。
在1980年代,编程更注重思考和设计,程序员通常会编写简洁的代码,并确保其高效运行。当时的编程课程旨在教会学生如何将小部件组合成更大的系统,类似于理解电阻的物理特性并应用欧姆定律。
然而,随着时间的推移,编程的本质发生了变化。现代编程更多地依赖于复杂的库和框架,程序员往往需要对这些库进行“科学实验”,通过尝试不同的输入来理解其行为。这种变化要求课程内容做出相应的调整。
新的6.001课程以机器人编程为核心,学生需要编写代码控制机器人移动。与电阻不同,机器人的行为并不完全符合理想模型,轮子可能会打滑,环境也会变化,因此学生需要构建具有鲁棒性的系统。这种编程方式与传统的Scheme课程(如《计算机程序的构造和解释》中所讨论的)有所不同。
至于为何选择Python,Sussman表示,Python可能已经有一个现成的机器人接口库,这成为了选择它的主要原因。
总的来说,MIT的这一转变反映了编程教育的现实需求,即从传统的理论教学转向更贴近实际应用的编程实践。尽管Scheme在理论教学中具有优势,但Python的实用性和广泛的库支持使其成为更合适的选择。
评论总结
评论内容主要围绕MIT从Scheme转向Python的课程改革展开,观点分为支持和反对两派。
支持Python的观点:
1. 实用性和市场价值:Python更实用且广泛应用于商业开发,适合培养学生的市场技能。
- "I do think it's reasonable to at least try to instill both foundational and marketable skills early." (djtriptych)
- "It actually makes sense to switch to Python since it’s far more ubiquitous and accessible than Scheme." (temporallobe)
- 生态系统和易用性:Python的生态系统强大,适合快速上手和解决实际问题。
- "That is the essence of Python's strength ... the eco-system." (teddunning)
- "Considering the target students of MIT CS department, I'd argue that they could simple start from an interpreter class in Python." (ferguessk)
支持Scheme的观点:
1. 理论基础和纯粹性:Scheme更适合教授计算机科学的核心概念,如抽象和递归。
- "There is a purity to Scheme. It is a beautiful light-weight language anyone can learn over a weekend." (KenSF)
- "Understanding that all loops could be done via recursion, and what a side effect is, is what fundamentally made me fall in love with CS." (varenc)
- 教学深度和启发:Scheme的教学方式能更深入地启发学生对计算机科学的理解。
- "I vividly remember sitting in lecture and being struck w/ the implications of functional programming as the professor said you could pass functions into functions and modify them." (mrexroad)
- "What I learned from SICP and Sussman's other books I would never have figured out any other way." (omnicognate)
中立或平衡观点:
1. 课程改革背景:MIT的改革不仅是语言切换,更是从深度课程转向广度课程的调整。
- "So I don't think it really captures it to say that MIT 'switched from Scheme to Python'." (keithwinstein)
- "The goal of these classes was to expose students to a broad range of all the cool stuff that EECS could do." (keithwinstein)
- 折中方案:一些学校尝试在Python课程中保留Scheme的元素,如实现Scheme解释器。
- "Berkeley seems to want to slice the baby in half. cs61a teaches in Python but then retains the implementation of a Scheme interpreter." (CalChris)
- "There's probably a middle ground somewhere." (AlanYx)
总结:评论反映了对MIT课程改革的不同看法,支持Python的观点强调实用性和易用性,而支持Scheme的观点则注重理论基础和教学深度。同时,部分评论指出改革背后的课程结构调整,并提出了折中方案。