11

I have noticed that people often act as though Scheme and Racket are the same thing here on Stack Overflow (and also elsewhere on the web. For example, questions about Scheme often generate solutions in Racket. If you take a look at the questions tagged , you'll see that half of their answers start with #lang racket.

Are these two languages really so similar that they can be considered to be equal? Is Racket just an extension of Scheme (i.e. Scheme code will always run on a Racket interpreter)?

I want to underline the fact that this is not a polemic, just a question from someone studying Scheme programming language.

Pops
  • 30,199
  • 37
  • 136
  • 151
Aslan986
  • 9,984
  • 11
  • 44
  • 75
  • @Lord Torgamus: really thank for your edit:) How It is what i would like to say ! – Aslan986 Apr 28 '12 at 23:25
  • 2
    [How is Racket different Than Scheme?](http://stackoverflow.com/questions/3345397/how-is-racket-different-than-scheme) – Janus Troelsen Apr 29 '12 at 19:19
  • Possible duplicate of [How is Racket different from Scheme?](https://stackoverflow.com/questions/3345397/how-is-racket-different-from-scheme) – Alex M. Apr 04 '19 at 11:01

2 Answers2

15

Racket is very close to Scheme, and in fact until two years ago it was called PLT Scheme.

However, the default language that is used in Racket diverges from Scheme in a few places (most notably it has immutable pairs). This is not something new: it had similar differences when it was called PLT Scheme. It's also not something that is unique to Racket: the Scheme standard(s) are so minimalistic that the language that they define is impractical, which means that all Scheme implementations add their own extensions. Another important point in the Racket case is that defining new dialects is very easy -- and Racket implements a strict R5RS dialect (the fact that it's strict means that it's not very useful) and it also implements an R6RS dialect.

Eli Barzilay
  • 29,301
  • 3
  • 67
  • 110
  • 1
    Also, note that the very nature of Scheme means the difference "language extensions" and "additional convenience libraries" is very much blurred, with syntax macros and everything. – ithisa Sep 08 '13 at 17:23
6

No, they are not equal. However, the Racket implementation can run standard Scheme code. Scheme is defined by a standard. Racket isn't. If you want portability, you can write R6RS code and execute it using Racket.

Racket is not a superset or subset of Scheme.

Janus Troelsen
  • 20,267
  • 14
  • 135
  • 196