cppscriptcore icon indicating copy to clipboard operation
cppscriptcore copied to clipboard

cling: C++ as scripting language

Open blockspacer opened this issue 6 years ago • 1 comments

see https://github.com/derofim/cling-cmake

HOT code reload possible approaches:

store app state fix cling undo for files https://root-forum.cern.ch/t/loading-unloading-class-as-interpreted-macro-in-cling-multiple-times/32976/2

execute cling code to change callbacks & variables nested cling::Interpreter with multiple cling::MetaProcessor IDK how to do it, but you can create child cling::Interpreter

blockspacer avatar Aug 24 '19 15:08 blockspacer

I know it's possible to use cling as C++ runtime compiler indeed. Originally I did not want to follow this path because JIT compilation was available only in clang, not in other compilers, like Visual studio or gcc. But recently I've noticed that Visual studio 2019 introduced support for cmake & also for clang cross compilation.

From my perspective open source compiler like clang (with scripting cling capability) is always better than closed source code / proprietary compiler, like MS VC, but will it become industry wide - that's the question.

But I've noticed that clang took already step towards binary compatibility with MS VC compiler https://clang.llvm.org/docs/MSVCCompatibility.html

which is always plus to clang (and cling).

I will take a closer took at the repository.

Thank you for providing this link, I was not aware of that one. (Studied indeed quite many alternatives)

tapika avatar Aug 25 '19 06:08 tapika