r/cpp • u/kindredseer • Sep 18 '26
Embedded C++
Just curious how useful the ability to embed C++ as a scripting language into your C++ programs would be? I mean like runtime JIT execution of C++ code in much the same way you might embed Lua, including the ability to restrict/sandbox it as necessary.
6
Upvotes
View all comments
Show parent comment
4
u/cristi1990an ++ Sep 22 '26
Because it's genuinely faster and easier to learn the scripting language and implement the solution in it than to write it in C++. Not to mention to maintain it. If runtime performance is a factor, then yes, I'm putting in the effort to write it in C++, but that's the only case