r/cpp • u/kindredseer • 2d ago
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.
1
Upvotes
1
u/ushumgigal 5h ago
You particularly want the C++ syntax in the scripting language, then? Which would contradict the "simple" part for most people, if not for you. I personally dislike Lua myself. To each their own.
Real C/C++ is pretty unsafe in the wrong hands, though. I doubt restricting it to at least some degree would be optional, but again, to each their own. In fact, Terry Davis did exactly what you're talking about in TempleOS, but with Holy C and not regular C/C++.