EDIT: Down votes? lol
It would be really convenient to have it done by the C preprocessor, but it seems impossible to me to get it with macro only. Am I wrong?
#define IOD_SYM(name) iod_define_symbol(name, _##name); #define S(name) s::_##name;
#define IOD_DEFINE_SYMBOL(name) iod_define_symbol(name, _##name) #define IOD_S(name) s::_##name #define ZLANG_iod_define (IOD_DEFINE_SYMBOL) #define ZLANG_iod_s (IOD_S)
// Define symbols $(define hello) $(define message) auto hello_api = make_api( // The hello world procedure. $(s hello) = [] () { return D($(s message) = "Hello world."); } );
EDIT: Down votes? lol