From: Joshua Jensen Date: Wed, 12 Dec 2012 05:15:13 GMT Subject: Re: Python extension commands in git - request for policy change Message-ID: <50C812E1.4020108@workspacewhiz.com> In-Reply-To: ----- Original Message ----- From: Patrick Donnelly Date: 12/11/2012 7:26 PM >> If we use lua for writing "builtin" commands, >> we'll need to export a lot of C functions and writing wrappers like >> this is boring and time consuming. Also, assume I export fn(char*,int) >> to Lua, then I change the prototype to fn(char*, char*), can Lua spot >> all the call sites at compile time (or something) so I can update >> them? > If the API calls are generic (don't require special handling), you can > use some preprocessor magic to save time/space. Since I mostly use C++, thanks to template metaprogramming, I get to register functions like so: void SomeExistingFunction(char* str, int num); luaState->GetGlobals().RegisterDirect("SomeExistingFunction", SomeExistingFunction); I certainly am not suggesting C++ be used within Git, but in this case, C++ has some nice compile-time advantages. :) -Josh