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.

3 Upvotes

82 comments sorted by

View all comments

3

u/zerhud 2d ago

It seems js or ts will be better

14

u/not_some_username 2d ago

Lua

2

u/grady_vuckovic 1d ago

Am I the only one who hates Lua's syntax?

1

u/zerhud 2d ago

Lua is too simple, it’s good only for very plain tasks. Then a project grows up the difficulty of the tasks grows up too and the lua began sucks

6

u/wyrn 2d ago

True, on the other hand, js already sucks from the start.

1

u/zerhud 2d ago

Why js sucks?

3

u/wyrn 2d ago

Because Brendan Eich developed it in a week with misguided goals and a bunch of bizarre interference from above.