When I started my Computer Science studies, Scheme was the first thing we learned in our first programming course. Almost 8 years later, I ask a friend of mine, and it seems that they are still teaching Scheme for beginners. Besides the annoying amount of parenthesis, I found Scheme helpful, and I was able to understand important concepts as how interpreted languages work, anonymous functions, recursion and so on.

My question comes, because, except for that semester, I have never used Scheme again, and even though it was helpful I have always thought why not teach another real world use language.

Wouldn't, for example, Python help in the same way? Why Scheme?

share|improve this question
    
For new learners it is better nowadays to call it Racket, solving an old communication problem. Scheme is the ancestor and was generally associated to one perspective (R5RS). Racket supports this, R6RS and the latest developments from the PLT team. – Armfoot 19 hours ago
    
@Armfoot I don't know about other universities, but Berkeley uses it's own scheme, which is distinct from racket. – k_g 14 hours ago
    
@k_g interesting, I thought that Scheme implementations used in schools were derived from the PLT group. Did Berkeley implement their version from a particular standard/perspective (RnRS)? – Armfoot 12 hours ago
1  
Creating a level playing field and forcing people to think differently. Too many kids show up knowing one curly-brace language or another and thinking that's all they ever need know. – Bob Jarvis 12 hours ago
    
@armfoot, I'm not sure exactly what the origin is, we've been using our own scheme for at least a decade. – k_g 11 hours ago

I think that the purpose of such a course is not to teach you a language. After all, Scheme, with its abstract syntax, is pretty minimal as a language. The purpose of a course like that is to teach you to think abstractly. If you can do that now, several years later, you can probably thank the course for getting you started. Abstraction, after all, is the big idea about computer languages.

A course in Python or another language can do similar things, but not in quite the same way, since in those languages you also need to learn the language syntax, idioms, and other structures. Scheme pushes all that aside for the opportunity to focus on abstraction. The things that are not in the language make it easier to focus on the big ideas.


This isn't really related to your question, but I note that many language designers start out with a lisp- (scheme-) like syntax to try out ideas in the language before they think very hard about its concrete syntax. It turns out to be very good for such experimentation.

share|improve this answer

There's one more reason I'd like to add to those here, less high-minded, but also a genuine consideration. One of the practical difficulties of teaching an introductory course is that the students come in at vastly different levels. Some are quite competent already, and some are brand new. It is rare for kids to come in with any experience outside of imperative labguages, though.

By utilizing a functional language in your first course, you get to have a classroom full of kids who have a much more similar footing. And when you move on, later, to imperative programming, you no longer have any kids with no experience. It's a simple trick to keep your cohorts more on-level without wasting the time of the advanced students.

share|improve this answer

Every second you spend explaining a programming language is a second you are not teaching programming, software development, software engineering, software design, or computer science.

You can teach the entirety of Scheme in a single lesson. You can probably teach the entirety of Scheme in 10 minutes. Python is significantly more complex than Scheme, so, you will spend significantly more time explaining Python and not teaching CS.

Oh, and BTW: the world's most widely-deployed programming language is essentially Scheme with syntax. (And an object system inspired by NewtonScript, Act-1, and Self.) Personally, I didn't understand ECMAScript until I learned Scheme and Self. Teaching Scheme will get your students halfway there. So, in that sense, Scheme is one of the most "real world" languages out there.

share|improve this answer
    
Perhaps I'm corrupted by already knowing programming languages that are so different from Scheme, but I've been poking at Scheme for quite some time now, and still don't feel like I understand it. The closest thing I've found to "learn Scheme in 10 minutes" is this: web-artanis.com/scheme.html. I've also read Norvig's claims that he could do in 3 days what it took his Java competitors 30 days to do. I'd love to have that kind of productivity spike, but I remain skeptical. – Robert Harvey yesterday
    
Scheme, therefore, remains one of those simple, elegant tools that can be compared to a surgeon's scalpel: powerful, but taking years to master. Most people apparently don't have that kind of patience, as evidenced by the ubiquity of curly-brace languages and the ongoing obscurity of s-expressions. – Robert Harvey yesterday
    
@RobertHarvey but then when pushed, Peter Norvig moved to Python: news.ycombinator.com/item?id=1803815. Said 10x productivity boost has there become "has the edge". And, presumably, not enough edge to bring Google to LISP. – TessellatingHeckler 1 hour ago

With Scheme, you start teaching programming concepts on day 1 - and also implementing them as working code on day 1.

With a typical procedural language (C++, Java, etc) you first have to crawl through the swamp formed around 20+ years of accumulated obsolescent and deprecated syntax. The survivors from that experience might get to learn some concepts eventually, but only if the course doesn't run out of time first!

Recent languages like Python have the great educational disadvantage of features like duck-typing, etc. Of course that makes them very effective tools in the hands of good programmers, but not so effective as teaching languages it's too easy to make subtle mistakes. (And don't even mention the mess that Python got itself into over syntax changes in the upgrade from Python 2 to Python 3...)

share|improve this answer
1  
Woah. Maybe a bit overstated. A couple of teaspoon fulls maybe. But yeah. It explains why those other languages require more pedagogy and support, most likely. – Buffy 2 days ago
    
Why would Python change the meaning of 5/2 or make print "a" an invalid syntax, I can't understand. But at least it's not like Swift which has many breaking changes in every subversion... – EralpB 2 hours ago

Simplicity

You can write the definition of scheme on the back of a postage stamp. Therefore as @Buffy says, you don't have to learn the language at the same time as learning the concepts.

It is a pure functional language.

You will be a better programmer, because you learnt functional. Better to do it first, few people learn functional second.

Education vs training

Education is about learning the concepts, training is about leaning a language. Education is long term, training is short term. Training is about learning, Education is about learning how to learn (meta learning).

A personal experience

I leant scheme late, after basic,pascal,C,C++,C#,python,tcl, et al. I have never done it again, but I have not stopped using it, in the way I program in other languages.

share|improve this answer
5  
Scheme is not a pure functional language. – Derek Elkins 2 days ago
    
That depends on the Scheme. – Racheet yesterday
    
@Derek it was originally, but some variants add mutation. Thing is you don't need much to implement mutation, just the basic building block. Therefore functional programming is a state of mind. The best way to get this state of mind is to learn a pure functional language such as scheme. And then add mutation your self, when and only when you need it. – ctrl-alt-delor yesterday

Scheme is not that widely used in the industry, but that is not the point. The purpose of CS is not to teach you any particular language, but to teach fundamental concepts. When you know the fundamental concepts, learning any particular language is pretty easy. Anybody with a solid CS background would be able to learn Python in a few hours of self-study.

Scheme is well-suited to teach fundamental concepts for a few reasons:

  • Built on very simple and logical concepts.
  • Syntax may be unconventional and somewhat tedious, but it is also totally logical and consistent, which means you don't waste a lot of time on surface issues.
  • Extremely flexible which means you can implement almost any CS concept and paradigm in it.

You can consider scheme more of a "blank slate" than Python. For example the SICP book teaches object oriented programming by having the student implement an object system from scratch in Scheme. Now in industry you might prefer a language which already have a solid built-in object system (like Python), but for teaching it gives a much deeper understanding to implement one yourself.

share|improve this answer

Procedural approach. Not a joke: with functional programming students are very quickly faced with the necessity to write their code as a set a (reusable) functions with a clearly defined role.

With the traditional approach of imperative/OO languages, they learn functions after a lot of other concepts : loops, arrays, etc. Probably too late.

For example: if you ask them a program to compare the average value of an array, a lot of them will write a loop to sum the values, not use a function for the sum of the array. Even if it was a previous exercice.

share|improve this answer
1  
“Procedural approach”? – ctrl-alt-delor 2 days ago
    
@ctre-alt-delor Imperative approach: a program is seen as a "sequence" (maybe structured) of actions. Procedural: relies on procedures (functions, subroutines, whatever) for the division of work. – Michel Billaud 2 days ago
2  
@MichelBillaud Procedural does not mean the same as functional. It usually refers to structured imperative programming. – Bergi 2 days ago
1  
Procedural is imperative, functional can be imperative, imperative can and should be structured, however functional ≠ procedural. Procedural is about doing and side-effects, functional is about return values. Both use subroutines. – ctrl-alt-delor yesterday
1  
@Bergi Notice that the answers says "Procedural apporoach", not "Procedural programming". The approach to teaching in functional languages is to reduce tasks until each subtask is a single function. That process is a procedural approach to the task, while not being procedural programming. Let's not argue with terms and definitions when discussing concepts to begin with. – Gypsy Spellweaver yesterday

With many programming languages, you don't see the computer's view of your input: the tokenized form, the parse trees. All those are part of a computer language's universe and are kept out of the programmer's hands and access.

In Scheme, your input is the parse tree. That puts you more level with the computer than many other languages. In some manner, Scheme does not even have a programming language rather than just a convenient way to enter parse trees.

In contrast, the distinction (or at least its naming) procedural/functional is sort of a red herring: the programming style employed in Scheme quite often is rather procedural, doing one action after another.

share|improve this answer

We don't have Scheme in our entire country (here in India) but that honour goes to C programming language.

For the purpose of my answer, substituting C for Scheme, I keep asking myself, why bother with C. After that 1 semester of C, I have never used C professionally anywhere. In fact, once I step out of educational purposes, C becomes useless. That begs the question, after almost 25 years, why are they still teaching C? Why not something else?

I think, why they are still teaching C (in my country) and Scheme (in yours) is probably because it is ubiquitous. there are any number of books written on C. More importantly, the faculties who teach them ( I think most faculties change their jobs once in 60 years) can teach the same thing for the rest of their lives, use the same lab manual, and use the same code, and ask the same questions, use the same evaluations. From a strictly logistical point of view, it makes sense to teach C 30 years ago, and 30 years hence.

Can you image the mess, if every five years, the universities change their syllabus? Thats a logistical nightmare (not to forget other challenges) no one wants to deal with. For instance, one university could decide to go with C sharp, and another with Java. That creates all kind of problems. However, if all universities agree (which is how things are now) to simply keep using Scheme (in your case) and C (in my case), life becomes simple.

Further, the foundation that you get by learning an ancient language is that, everything that came after it, be default, would be easier. I learnt to ride a bike (as in motorcycle, not bicycle) in my dads old bike which was, well not that good. However, because I drove the tough one, all of today's bikes seem like child's play. Although I don't use C itself, anytime I learn a new language, I unconsciously compare it to C, and learn from that.

Update 1 : To add some context, I have been part of the IT industry for 11 years, and 5 of them as a developer/trainer/educator who travels widely. I am sure C is used somewhere, I haven't seen one single enterprise usage of C and I have worked for startups, small companies (less than 100 employees) and for MNCs (more than 2000 employees) and never ever has any division, anywhere talked about C, used C or implemented C.

Again, no disrespect to C (or its legion of fans) but I request that my opinion be taken in this context.

share|improve this answer
    
I don't think you can compare Scheme and C in this way. C is used out there in real world projects. Operating systems and hardware related stuff is still a domain for C programmers. There is much less Scheme outside of education. – BlackJack yesterday
    
There are enough uses for Scheme et al in an educational context to avoid assuming this rather sarcastic viewpoint... – AnoE yesterday
    
@BlackJack I picked the closest reference I could pick to write my answer. May be C is used somewhere, but I was only explaining my exposure in the industry and the prevalence of C, not the entire software industry's and the prevalence of C. – Jay yesterday
1  
Your reasoning is flawed. You are likely correct that teaching C is mainly due to inertia preventing a switch to something more modern. C has little to recommend it for the purpose of teaching program except that at one point in time it was the most popular language around. Neither of these is true for Scheme. – Jules 21 hours ago
1  
Then, Scheme has my compliments that it does not have any of the baggage that C has. Further, I hope that someday, the universities here in India will adopt Scheme so the youth in India can also benefit from it. You know, prosperity for everyone :) – Jay 21 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.