kids encyclopedia robot

Scheme (programming language) facts for kids

Kids Encyclopedia Facts
Quick facts for kids
Scheme
Lambda lc.svg
Paradigm multi-paradigm: functional, procedural, meta
Designed by Guy L. Steele and Gerald Jay Sussman
First appeared 1975
Stable release
R6RS (ratified standard) / 2007
Typing discipline strong, dynamic
Scope lexical
Filename extensions .scm, .ss
Major implementations
Many. See Category:Scheme implementations
Dialects
T
Influenced by
Lisp, ALGOL, MDL
Influenced
Clojure, Common Lisp, Dylan, EuLisp, Haskell, Hop, JavaScript, Kernel, Lua, R, S, Racket, Ruby

Scheme is a special kind of programming language. It's like a set of instructions you give to a computer to make it do things. Scheme is part of a bigger family of languages called LISP. It's often used to help students learn how computers think and how to solve problems with code.

What is Scheme?

Scheme is one of the two main types, or "dialects," of the LISP programming language that people use a lot today. The other popular type is called Common Lisp. Scheme was created in 1975 by Guy L. Steele and Gerald Jay Sussman.

Why is Scheme Special?

Scheme is known for being very simple and clear. It has a small number of basic rules, which makes it easier to learn. Even though it's simple, it's also very powerful. You can use it to build complex programs.

  • Flexible Style: Scheme is a "multi-paradigm" language. This means you can write programs in different ways.

** You can use a functional style, where you focus on functions that take inputs and give outputs. ** You can also use a procedural style, which is more about a step-by-step list of instructions.

  • Learning Tool: Many universities and colleges use Scheme to teach computer science students. It helps them understand important ideas about how programming languages work. It teaches them how to think logically and solve problems.
  • Dynamic and Strong: Scheme is a "dynamically typed" language. This means you don't have to tell the computer what type of data (like numbers or text) a variable will hold before you use it. It figures it out as the program runs. It's also "strongly typed," which means it tries to prevent mistakes by not letting you mix different types of data in ways that don't make sense.

How Scheme Works

Scheme uses a lot of parentheses `()` to group things together. This might look a bit different from other languages you've seen. For example, to add numbers in Scheme, you would write `(+ 1 2 3)` instead of `1 + 2 + 3`. The `+` sign comes first! This style is called "prefix notation."

Here's a simple example of Scheme code:

(define (greet name)
  (display "Hello, ")
  (display name)
  (display "!")
  (newline))

(greet "World")

This code defines a function called `greet` that takes a `name` and prints "Hello, " followed by the name, and then an exclamation mark. When you run `(greet "World")`, it would show:

Hello, World!

Where is Scheme Used?

While Scheme is great for teaching, it's also used in some real-world projects. Because it's so flexible, programmers can use it for many different tasks. It has influenced many other popular programming languages, like JavaScript and Ruby. This means ideas from Scheme have helped shape how these other languages work.

kids search engine
Scheme (programming language) Facts for Kids. Kiddle Encyclopedia.