52

I have just started to study computer sciences at my university where they teach us programming in Scheme.

Since I have learned C++ for the last 6 years, Scheme appears a little odd to me. My instructors tell me you can write any program you can write in C or Java with it.

Is anybody really using this language?

gonzobrains
  • 7,856
  • 14
  • 81
  • 132
NiklasMM
  • 2,895
  • 2
  • 22
  • 26
  • 62
    Be thankful! I would kill for my university to teach in Scheme. – Mike B Nov 14 '08 at 19:04
  • 2
    No doubt. Most universities now teach Java instead... – Jason Down Nov 14 '08 at 19:11
  • 5
    There's nothing wrong with learning Java, but some universities (mine) teach Java exclusively, as if Programming == Java. – Mike B Nov 14 '08 at 20:18
  • I agree... nothing wrong with teaching it, just not exclusively. – Jason Down Nov 14 '08 at 20:27
  • Scheme is used by a fair number of universities. Many people (including me) see it as a good learning tool, but it is not often used in the industry to any great degree. – Cam Mar 28 '10 at 00:14
  • Also: Scheme is Turing complete! This means that you can do anything with Scheme you could do with any other turing complete language. Including, but not limited to, _writing a C compiler_. – Cam Mar 28 '10 at 00:17
  • 2
    It's very useful to know at least some kind of LISPy language, though. I'm in industry, and my team is using Clojure for a fair bit of new development; if we were looking for an intern, Scheme experience would be a very big plus. – Charles Duffy Mar 28 '10 at 00:17
  • 4
    ESR's take is also worth noting here: "LISP is worth learning for a different reason — the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot" – Charles Duffy Mar 28 '10 at 00:24

21 Answers21

47

Not a lot of people use it that I know, but it is definitely worth a peek (if even just to try programming in another paradigm, so that you learn to think differently). You're lucky to be able to take a class that uses Scheme, as most universities these days now teach Java. Here's a good link if you want to see some lectures from MIT or work on sample problems etc.

MIT Open Courseware - Structure and Interpretation Of Computer Programs

There's an accompanying book available on-line for free as well (Structure and Interpretation of Computer Programs).

UPDATE:

For those interested in a language that is similar to scheme that makes use of the JVM and can access Java libraries (since lots of universities use Java), check out Clojure. Maybe this will become the new language of choice for computer science introduction (we can all hope!).

chrslg
  • 9,023
  • 5
  • 17
  • 31
Jason Down
  • 21,731
  • 12
  • 83
  • 117
  • 1
    Although theres a rumour that MIT are switching from Scheme to Python: http://lambda-the-ultimate.org/node/3312 – Sean May 14 '09 at 15:36
  • 4
    Not just a rumor; MIT has transitioned their intro to CS class (MIT6.00) from Scheme to Python, dropped SICP (both the book and as the name of the class) and are using Allen Downey's "How To Think Like A Computer Scientist" instead. Berkeley's CS61A still uses SICP and Scheme, though. – Alex Basson May 26 '10 at 15:02
  • @Alex: Berkeley has also now jumped the shark and switched to Python, starting next semester (I gather Harvey, the really awesome 61A professor, is not teaching it any more). I think this is really unfortunate--61A with Scheme was a brilliant CS class and I am really lucky since I got to take it in its penultimate semester. – Tikhon Jelvis Jun 05 '11 at 06:45
  • 2
    I am an experienced programmer and I watched a year ago the lectures, it's brilliant, sheer joy. I also peeked into the new Python lectures videos and it's a disaster. Not because python but because of the lecturer. The material is full of mistakes. – Karoly Horvath Jul 14 '11 at 20:30
  • @Jason Down, I planed to convert from scheme to some other language do you have any suggestions ? – Visakh V A Nov 09 '16 at 05:26
  • 1
    @VisakhVA It depends on what you're doing. Are you planning to convert existing programs with specific needs? Or are you just looking at learning something new and interesting? I'd suggest Clojure if you're looking to stick with another Lisp dialect. If you're up for something interesting (which Clojure is), my two favourite programming languages right now are Elixir and F#. – Jason Down Nov 11 '16 at 14:01
  • It's 2019 and I'm reading "The Joy of Clojure". Good JVM language. Leaving the Java tarpit, its [kingdom of nouns](https://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html) and the soul-crushing framework / application-serverator monstrosities is worth it. Plus you get some kind of Prolog-lite and Datalog database (nonfree) throw in, what's not to like? I may have to return, but not yet, not yet... – David Tonhofer Jul 17 '19 at 13:23
  • @DavidTonhofer I read the first edition of that book about 7 or 8 years ago. I don't use Clojure (unfortunately), since I'm mainly working in the .Net space, but I remember that book being excellent and Clojure looking awesome. – Jason Down Jul 19 '19 at 18:09
30

Square USA used it to make the movie Final Fantasy.

Here's a paper they published on it: Gluing Things Together - Scheme in the Real-time CG Content Production.

From that paper:

At SIGGRAPH 2000 and 2001, we, Square USA R&D team showed real-time rendering of scenes from full computer-generated movie ``Final Fantasy: The Spirits Within''.

[...]

We found it tremendous help to have an embedded Scheme interpreter in real-time rendering engine.

Matt Curtis
  • 23,168
  • 8
  • 60
  • 63
22

Scheme will make you think differently about programming. Just try be open-minded!

leppie
  • 115,091
  • 17
  • 196
  • 297
13

"Is anybody really using this language?"

Paul Graham, famously.

moonshadow
  • 86,889
  • 7
  • 82
  • 122
  • 1
    Meh, dialects. His rant and the links at the bottom are still applicable. – moonshadow Nov 14 '08 at 19:26
  • 2
    The crux of this stackoverflow question is also summed up in a Paul Graham quote: "I suppose I should learn Lisp, but it seems so foreign." – Michael Burr Nov 14 '08 at 19:35
  • 6
    Paul Graham used a Scheme dialect to implement Arc: http://paulgraham.com/arc0.html ("MzScheme, which the current version of Arc compiles to ..."). – Max Lybbert Nov 14 '08 at 20:08
12

JavaScript is remarkably similar to Scheme in many ways (though it is missing continuations and the advanced numerical system of Scheme).

From "ECMAScript Language Overview" (PDF). 2007-10-23. pp. 4. Retrieved 2009-05-03.

ES3 is a simple, highly dynamic, object-based language that takes its major ideas from the languages Self and Scheme. The programming style is a mixture of object-based and functional programming: The primary abstraction mechanisms in ES3 are lexically scoped higher-order functions and mutable objects ...

cdiggins
  • 17,602
  • 7
  • 105
  • 102
12

I'm currently working through the SICP lectures that Abelson and Sussman gave at Hewlett-Packard in 1986 and the Cal-Berkeley CS61A podcasts given by Brian Harvey (taught from the same book) and following along in Scheme, and the experience is opening up whole new ways of thinking for me. To anyone who, like me, doesn't have any formal CS higher-education, I highly recommend it...

avstrallen
  • 986
  • 9
  • 9
10

I've worked on a project with scheme code in production, it can be pretty cool stuff. Scheme had this cool feature of dynamically recompiling to self-optimize execution. I think it's like one step away from sky-net.

rvighne
  • 20,755
  • 11
  • 51
  • 73
Alex B
  • 24,678
  • 14
  • 64
  • 87
  • 1
    Can you expand it a bit more? It sounds very cool, but having to download a PDF to read about it is a little embarrassing… – Display Name Jul 18 '15 at 12:02
8

I used it in college, but I haven't used it much since.

If you're shaky on recursion at all, I highly recommend learning Scheme or Lisp. You'll learn to think recursively about all sorts of things. Is recursion always the right way to go? Of course not. But it's a useful tool to have in the toolbox.

I always encourage developers to learn new languages. The more languages you learn and become proficient with, the more abstractly you'll think about problems. The less you're tied to a specific language, the more likely you are to choose the language which best fits your problem.

Matthew Cole
  • 1,329
  • 2
  • 18
  • 30
7

Beyond personal experience, the closest thing you'll get to an objective guess is the TIOBE index, which currently ranks LISP/Scheme 21st with 0.470% market share. TIOBE uses search engine results to create the list. Obviously, you'll want to take the list (and any other guess at Scheme usage) with a grain of salt.

Shameless promotion: check out PLT Scheme. They've created a nice community, offer their IDE for many platforms, and give you a nice library selection out-of-the-box.

Here's an article describing PLT Scheme in a commercial app: http://www.untyped.com/downloads/icfp068-welsh.pdf.

Corbin March
  • 25,526
  • 6
  • 73
  • 100
5

Here in Russia we develop software using PLT Scheme. And it sells well ;)

Erik Kaplun
  • 37,128
  • 15
  • 99
  • 111
paul
  • 1,100
  • 1
  • 8
  • 14
4

Clojure is a Scheme/Lisp like language that works in the JVM and is really good for parallel processing (supposedly). The great thing about using Clojure is that you get access to the entire Java API, and any other Java libraries.

Clojure is getting pretty popular with language geeks, along with Scala.

Chad Okere
  • 4,570
  • 1
  • 21
  • 19
3

Yes! Scheme is quite interesting. I learned it at my first year at the University of Waterloo. It is a little different at first, especially if you come from an OOP/imperative background.

It does a lot of nice things for you, and the functional paradigm is definitely one you should explore, if for nothing but gaining a different perspective.

It is also quite useful, for example, I just made a compiler for a super simplified version of C, and I couldn't imagine doing it without a functional language (:

3

Jazz Scheme is an open source scheme environment built on Gambit Scheme and it seems to aggressively promote industrial uses, check it out:

Jazz Scheme

They report new uses in their news:

Jazz Scheme News

According to this page, Scheme is (or was) in use at: DEC, TI, Tektronix, HP, and Sun.

This guy's LinkedIn CV reports using Chez Scheme at Disney.

Just googling around a little can reveal a lot. In this case, it bears out the observation that I once heard that Scheme use is pretty ubiquitous, just not very public.

Pinochle
  • 5,515
  • 2
  • 26
  • 20
  • The Disney project was "Co-creator of a virtual reality implementation of Aladdin's Magic Carpet Ride. ... scenario scripting language implemented on top of Chez Scheme and C++" http://ivizlab.sfu.ca/arya/Papers/ACM/SIGGRAPH-96/Storytelling%20in%20VR.pdf – kristianp Aug 07 '17 at 00:53
3

All languages can be used to write anything, with enough effort :)

However, Scheme's pretty cool - knowing Scheme tends to influence your programming in other languages, in my experience.

Scheme macros are extremely powerful, and call-with-current-continuation a mindwarping function.

The classic test is Structure and Interpretation of Computer Programs ("SICP"). Worth a read.

The Archetypal Paul
  • 41,321
  • 20
  • 104
  • 134
3

There are quite a few scheme implementation for Java platform, they are used for scripting and prototyping of Java applications. There exists continuation-based web framework for J2EE in scheme, called SISCWeb.

Guile scheme is used as scripting language in some GNU apps - GnuCash for example is mostly written in Scheme.

Also TinyScheme is used as scripting language for GIMP and some variations of it are used in embedded systems.

Anton Nazarov
  • 626
  • 3
  • 5
2

Absolutely. Scheme is good for a number of different classes of problems. Jim Blandy is working on a version of Scheme called Minor that integrates a lot closer with native systems and is meant to be performant.

I understand that LilyPond uses Guile for extensibility, although I don't know that I'd hold LilyPond as the ideal shining example of software as it seriously wounded my OS X installation...

plinth
  • 48,267
  • 11
  • 78
  • 120
1

I have learned Scheme for over 2 years now and it has significantly helped me as a programmer. It taught me how to think differently and understand deeper concepts and links between programming languages. It is in-fact true that you can write any program in Scheme as in Java and C, however it is rather difficult. There are series of program transformations that must take place before it can be interpreted as Java or C code. It's worth while learning the basics at least though.

Micah
  • 263
  • 1
  • 5
  • 14
1

I recently heard on the stackoverflow podcast that Reddit was originally written in LISP!

Kyle Cronin
  • 77,653
  • 43
  • 148
  • 164
CodingWithoutComments
  • 35,598
  • 21
  • 73
  • 86
1

I am playing with IronScheme these days, but don't know anyone who uses Scheme for actual work.

Nemanja Trifunovic
  • 24,346
  • 3
  • 50
  • 88
1

Scheme is used mainly for teaching purposes. That's one reason there hasn't been a standard module system until the (controversial) RSR6 one: when writing small programs for homework it's unusual to need lots of big libraries.

Scheme started out as an experiment to add Smalltalk-like OOP to Lisp. It eventually changed the macro system, added call/cc (and dynamic-wind, dynamic-unwind), and grew quite a bit.

Aside from the GNU projects using Guile as a scripting language, I don't know of any production systems using Scheme. I do know of a handful of production systems using Lisp, though (Orbitz has Lisp code in its reservation system).

Max Lybbert
  • 19,717
  • 4
  • 46
  • 69
  • "Scheme started out as an experiment to add Smalltalk-like OOP to Lisp.", Is that right? Citation please. – kristianp Aug 07 '17 at 02:51
  • Guy Steele ( http://www.dreamsongs.com/ObjectsHaveNotFailedNarr.html ): "The Scheme programming language was born from an attempt in 1975 to explicate object-oriented programming in terms that Gerry Sussman and I could understand. In particular, we wanted to restate Carl Hewitt's theory of actors in words of one syllable, so to speak." Followed by https://en.wikipedia.org/wiki/Actor_model#History . – Max Lybbert Aug 09 '17 at 17:34
  • I wrote the original answer after hearing a Smalltalk podcast where the guest said what I wrote: that Scheme was an experiment with Smalltalk-like message passing in Lisp. Looking at what the people doing the experiment said at the time, though, it was an effort to try actors in Lisp, and actors were inspired by Smalltalk (and other systems). – Max Lybbert Aug 09 '17 at 17:59
  • Interesting, thanks. – kristianp Aug 10 '17 at 08:02
0

I'm learning about it in my Program Language Design class, it has some neat uses. I would only use it for a problem that lends itself easily to tail recursion.

Chad
  • 2,064
  • 1
  • 22
  • 29