Cling: Running C++ in an interpreter
blog.coldflake.com
Cling: Running C++ in an interpreter
1–10 of 49 posts
Re: Cling: Running C++ in an interpreter
#2Re: Cling: Running C++ in an interpreter
#3This is a CERN project and it uses Clang from the LLVM project. The idea is simple: use the clang to generate LLVM and then use LLVM just-in-time compiler.
Re: Cling: Running C++ in an interpreter
#4Re: Cling: Running C++ in an interpreter
#5So, what are it's limitations, if any?
Re: Cling: Running C++ in an interpreter
#6Re: Cling: Running C++ in an interpreter
#7Why would I do that :S
C++ could also be used as an embedded extension language using something like this.
Re: Cling: Running C++ in an interpreter
#8Well, for anyone interested in Cling, check out this Google tech talk: http://www.youtube.com/watch?v=f9Xfh8pv3Fs This is a CERN project and it uses Clang from the LLVM project. The idea is simple: use the clang to generate LLVM and then use LLVM just-in-time compiler.
Re: Cling: Running C++ in an interpreter
#9cd ~/src;
cp -R c-idea-template foobar;
cd foobar;
$EDITOR test.c*
and in your editor (say vim) just run :make
or write a .sh file with all of the above in it so it's just one step. No complex install procedure, you get all your normal tools and stuff.
Alternaitvely, create a 'test projects' git(hub) project, with the files you want in it, and create a new branch for each idea. That way you get backups as well.
Re: Cling: Running C++ in an interpreter
#10Why would I do that :S
Why not? It's great to quickly test C++, I have yet to find a developer who doesn't love a REPL for one. C++ could also be used as an embedded extension language using something like this.