Lightning Talk: Write Valid C++ and Python in One File
summary
A concrete hack that produces one source file both C++ and Python can parse: the C preprocessor emits C++ declarations and Python assignments by using macros that expand to MAJOR_VERSION, MINOR_VERSION, BUILD_NUMBER constants, #undef after use and a macro that creates a dummy print_namespace = 0 so Python imports a namespace-like object. The demo builds a single chimera file, compiles and imports correctly, claims an order‑of‑magnitude saving in update time, and leaves build number automation to a separate step.
AI-written summary · about
related talks
06mLightning Talk: I Wrote a C++ REPL in 20 Lines of Code - And so can you!
05mLightning Talk: What Does a CMake Developer Want From CMake?
08mLightning Talk: Coccinelle for C++
49mBuild Systems: a Simple Solution to a Complicated Problem
05mLightning Talk: majsdown: Metaprogramming? In my Slides?
55mSo, you inherited a large code base...
01h 06mCommand Line C++ Development
58mThere Will Be Build Systems: I Configure Your Milkshake
