Home

ReadEvalPrintLoop

ReadEvalPrintLoop (commonly abbreviated REPL) is an interactive programming environment that reads a line or block of user input, evaluates it, prints the result, and then repeats. It is a fundamental component of many interpreted languages and is often exposed as a command-line shell or an integrated development environment's console.

In a typical REPL session, the loop begins with reading input, parsing and evaluating expressions or statements,

Origin and usage: The concept emerged from the Lisp family of languages in the 1960s and 1970s,

Examples: Python, Ruby, JavaScript (Node.js), Haskell (ghci), R, Julia, and Lisp/Scheme implementations all provide REPLs. Some

Security and design considerations: A REPL runs arbitrary code and can reveal or modify the program state,

and
printing
the
outcome.
If
the
input
produces
side
effects,
those
effects
are
executed.
The
loop
continues
until
the
user
issues
an
exit
command
or
terminates
the
process.
Modern
REPLs
may
support
features
such
as
multi-line
input,
syntax
highlighting,
command
history,
tab
completion,
and
exception
reporting
that
helps
debugging.
where
interactive
computation
and
incremental
development
were
central.
The
term
REPL
is
commonly
associated
with
Lisp
systems,
but
the
model
has
since
spread
to
many
languages
and
tools
as
a
general
interactive
programming
interface.
languages
provide
a
separate
standalone
executable
for
the
REPL,
while
others
offer
an
integrated
shell
within
an
IDE
or
notebook
environment.
so
it
is
typically
restricted
to
trusted
environments.
Performance
overhead
and
the
potential
for
incomplete
or
partial
code
evaluation
can
affect
behavior
compared
to
batch
compilation
or
execution.
See
also:
REPL,
interactive
programming,
shell.