3 ms·
CINT is the closest thing I've ever seen to a real C++ REPL. It's actually used quite extensively in the ROOT data analysis environment (REPL, reflection, UI si
by kaitanie 15y ago
CINT is the closest thing I've ever seen to a real C++ REPL. It's actually used quite extensively in the ROOT data analysis environment (REPL, reflection, UI signal/slot mechanism, object persistency, creating dynamically Python bindings, etc.).
As a REPL CINT actually works surprisingly well. Unfortunately it seems to have some problems interpreting certain "advanced" C++ stuff, such as templates and especially code that uses STL heavily. Another problem with it is that since you still need to manage memory manually and have direct access to pointers it's very easy to make CINT (or ROOT) session crash... :(
Btw, the ROOT developers are also working on a new LLVM based C++ interpreter called Cling:
http://root.cern.ch/drupal/category/package-context/cling http://root.cern.ch/drupal/category/package-context/cling
- wbhart 15y agoThanks for pointing out cling. Unfortunately they don't say which version of Clang/LLVM they build against. Their patches only seem to apply cleanly to version 2.8. But unfortunately it doesn't build for me. I also tried building it against 2.7 and 2.9 for good measure, but no cigar.
- wbhart 15y agoI got it to work. You have to build against the latest svn of clang and llvm. I personally found parallel make didn't work for me and that I had to apply the two very small patches to the makefiles manually, though the latter may be fixed by now. It looks like a really excellent project, and I can't wait until they have it working the way they want it to!