Can somebody please shine some light on why such an endeavor was undertaken by CERN? What was so important about JIT C++ that they had to write such a sophisticated piece of software?
What a lot of people aren't mentioning is the legacy factor.
We had a "C++ interpreter" called CINT for a long time, which the ROOT data analysis framework was built around. It was, to put it bluntly, a mess: it had inconsistent scoping and syntax with C++, gave worthless debugging messages, and couldn't handle a lot of standard C++ code.
It was also the way that a lot of physicists at CERN ran their analysis code. We needed an interactive language to make graphs and histograms and to fit our data, and when CINT was conceived the only other solutions were proprietary packages like MATLAB. So CERN went with a homegrown solution and wrote a C++ interpreter many years ago.
Flash forward 15 years. "Big data" is all the rage. Python, R, and the huge list of packages built around around them would easily solve the problems CINT was designed for. But the codebase for the larger experiments at CERN is maintained by physics graduate students, a good fraction of whom had no programming experience before grad school. We don't have the time or the resources to rewrite our existing code in scipy, and the older generation doesn't have the experience to supervise such a transition.
Given that so many physicists are still using CINT, the ROOT developers had to make a choice: they could continue to maintain CINT, which would have been nearly impossible with their resources and the evolution of C++, or they could rewrite something that did almost the same thing using more modern tools. They opted for the later.
Interactive programming is very developer friendly workflow, something that was already possible at Xerox PARC in their Smalltalk, Interlisp-D and Mesa/CEDAR environments.
Actually there was an early attempt to provide C++ repls back in the early 90's with Lucid Energize C++, after they pivoted from Lisp Machines and applied their knowledge to C++.
Also the majority of CERN code is written in a mix of Fortran and C++, and not all teams like to use Python. So they rather use something that provides interactivity to research their algorithms and speed at the same time.
Wow, that's interesting. Interactive python a la jupyter notebook revolutionized my workflow; I guess it makes sense to allow the same for a codebase written largely in c++
If you look at the root of the domain (https://root.cern.ch/) it seems to be part of work on a scientific computing framework in C++. And having a nice REPL is important for this kind of thing, and if it is in C++ you can look deeper into it? (instead of using one of the bindings to Python/... for the REPL, where you can't inspect what is going on inside the C++ code)
This is called systems research, a lost art in the US, but still very important if you want to write complex systems as as they do in CERN. By the way, that's why C++ was designed in the first place.
JIT compilation opens up a lot of new features and workflows in a language, from interactive development at a REPL to in some cases very powerful abilities to generate, compile and run code all at runtime (i.e. "eval" in lisps).