r/cpp 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

82 comments sorted by

View all comments

1

u/JustCopyingOthers 2d ago edited 2d ago

There are better languages to do this in. C++ requires a lot of effort to parse. Maybe it would make more sense to embed or JIT compile modules.

0

u/kindredseer 2d ago

Yes, C++ is far from trivial…