You must have a certain skill set to write a scripting binding interface for C++ like luabind, sol2, pybind, or ChaiScript. This is a skill set that few seem to posses. But developing this skill set helps you to understand the language in a new, deeper, and more unique way.
We will start from the first principles of what we are trying to accomplish and why. We will then cover the basics of deducing function signatures with templates and the limitations that are hit when you have function overloads. We will wrap these user provided functions with a compile time <-> runtime interface, then demonstrate a simple function dispatch engine.
If we have time, we will then show function reference syntax and how you can use this to bind script engine functions back into the C++ statically typed world.
We will not get to an actual parser for a scripting language. That will be left as an exercise to the viewer.
Jason is host of the YouTube channel C++Weekly, co-host emeritus of the podcast CppCast, author of C++ Best Practices, and author of the first casual puzzle books designed to teach C++ fundamentals while having fun!
Wednesday September 18, 2024 14:00 - 15:00 MDT
Cottonwood 8/9