RacketSchemeR5RSR6RSR7RSStandards

Racket vs Scheme: Standards (R5RS, R6RS, R7RS) | Schema Programming Part 29

2.305 min read
Md Nasim SheikhMd Nasim Sheikh
Share:

Throughout this series, we've focused on #lang racket. But Racket descends from Scheme. Occasionally, you might want to run code written for a specific Scheme standard.

Advertisement

The "R" Standards

Scheme is standardized by reports causing "Revised^n Report on the Algorithmic Language Scheme".

  • R5RS (1998): The classic, minimalist standard.
  • R6RS (2007): A larger, battery-included standard (controversial).
  • R7RS (2013): A split standard (Small vs Large).

Running Scheme in Racket

Racket supports these standards natively!

R5RS

#lang r5rs
(display "Hello, Old School Scheme!")

R6RS

#!r6rs
(import (rnrs))
(display "Hello, Portable Scheme!")

Why Racket Diverged?

Racket started as PLT Scheme but renamed itself in 2010.

  • Scheme prioritizes minimalism and mathematical purity.
  • Racket prioritizes language creation, extensive libraries, and production utility.

Racket is "a programming-language programming language" that happens to implement Scheme.

Advertisement

Summary

If you find an old SICP (Structure and Interpretation of Computer Programs) exercise or a portable Scheme library, you can run it in Racket effortlessly by choosing the right #lang.

Quick Quiz

Which standard is considered the 'classic' minimalist Scheme definition from 1998?

Md Nasim Sheikh
Written by

Md Nasim Sheikh

Software Developer at softexForge

Verified Author150+ Projects
Published:

You May Also Like