Skip to content
Search

Read–eval–print loop

lastmod 2025-03-19created 2020-09-115 edits

A REPL (read-eval-print loop), also called an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs (e.g., single expressions), evaluates (executes) them, and returns the result to the user. A program written in a REPL environment is executed piecewise. The term usually also refers to programming interfaces similar to the classic Lisp machine interactive environment. Common examples include command-line shells and similar environments for programming languages, and the technique is very characteristic of scripting languages.

Categories

  • Shelgon - Rust framework for building interactive REPL shells

Overview

In a REPL, the user enters one or more expressions (rather than an entire compilation unit), and the REPL evaluates them and displays the results.

Uses

As a shell, a REPL environment allows users to access relevant features of an operating system in addition to providing access to programming capabilities.

The most common use for REPLs outside of operating system shells is for instantaneous prototyping. Other uses include mathematical calculation, creating documents that integrate scientific analysis (e.g., IPython), interactive software maintenance, benchmarking, and algorithm exploration.

REPLs are becoming an essential part of learning a new language, because they give beginners quick feedback.

Cloud Services

See also

Favorite site

Online REPL

author Zer0 sitemap