REPL (Read-Eval-Print-Loop) in C++: hands-on session

REPL (Read-Eval-Print-Loop) in C++: hands-on session

An efficient way to prototype  C++ applications & research work and to write demonstrations or teaching material using C++

A Read-Eval-Print-Loop (REPL) enables to leverage very rapid and robust application development, prototyping and testing. This kind of development environment originates from the early days of functional programming (Lisp machines and the like), and is common in functional and scripting languages.

As a compiled language, C++ was out of the loop for a long time.

Enters CLING

Cling realizes the read-eval-print loop (REPL) concept for the C++ language. Thus, you can gain in speed of development while the compiler (clang) still checks your code and guarantees a native speed of execution.

Hands-on demonstrations

This article demonstrates how easy and useful it can sometimes be to work in this kind of environment in C++. This is especially useful in order to develop with a functional approach (such as with the range-v3 library), and for research and/or training applications.

This article is voluntarily very short, so that you can jump to the hands-on demonstrations. You will be able to use the a C++ REPL online, without even having to install anything.

Go to the demonstration notebooks

(opens in a new window)

About the tools that were used to write these notebooks

These notebooks  were written using REPL tools, namely jupyter notebook,  xeus cling and of course cling. More info in the notebooks themselves.

About Pascal Thomet

I am Pascal Thomet (pthomet -at- gmail -dot- com). I live in Paris, where I was the co-founder of IVS ( I always had an interest in transmitting knowledge, hence this blog.