Every programmer has used one.
Read-eval-print loops (or REPLs) are a centerpiece of modern software development.
What exactly is a REPL, how does it work, and where can I use one?
Let's find out.
You can imagine a REPL as a program that reads your inputs, evaluates them, and prints you the results of whatever you put in. In detail:
This rings a bell, doesn't it?
REPLs are everywhere:
node
) or Ruby (irb
)With REPLs you can do explorational programming or analysis. They often have autocomplete, making your dev-life easier.
REPLs are especially useful when you want to find a way to do something for the first time without saving and running a file dozens of times.