e38b99f7   
   From: dave@boostpro.com   
      
   on Tue Dec 27 2011, Ebenezer wrote:   
      
   > On Dec 24, 4:07 pm, Dave Abrahams wrote:   
   >> on Fri Dec 23 2011, Gene Bushuyev wrote:   
   >   
   >>   
   >>> I also found that automatic code generation can often be a better   
   >>> alternative to complicated macros.   
   >>   
   >> My experience writing Boost.Python led me to the opposite conclusion. I   
   >> started out with some Python scripts to generate the overload sets I   
   >> needed, and eventually replaced them with the use of Boost.Preprocessor   
   >> metaprogramming because:   
   >>   
   >> 1. Before the change, my users couldn't figure out how to run the   
   >> scripts when they needed to extend the number of arguments supported   
   >> by the library, whereas afterward all they needed was   
   >> -DBOOST_PYTHON_MAX_ARITY=25 on their command line.   
   >   
   > Perhaps you should have made your code generator an on line   
   > code generator. (That doesn't imply it is proprietary -- if   
   > you want you could still make the source code avaialable.)   
   > That way people wouldn't have had to deal with the scripts.   
      
   Sure...at the cost of a bunch more labor, web programming (which I   
   didn't know how to do at the time) and server resources (which I didn't   
   have at the time).   
      
   >> 2. The scripts were actually harder to maintain than the   
   >> Boost.Preprocessor code. I had tried to write a reasonably general   
   >> system for doing this code generation, but then I had to maintain   
   >> it... and coming back to it after a little while was painful.   
   >   
   > I believe you, but would have been inclined to use C++ for the code   
   > generator.   
      
   I don't see how that could have made any substantial difference. I am a   
   fluent Python programmer. Neither C++ nor Python is particularly well   
   suited to generating C++ code. The advantages of having the generator   
   already integrated with the compiler outweighed everything else in the end.   
      
   --   
   Dave Abrahams   
   BoostPro Computing   
   http://www.boostpro.com   
      
      
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
    [ comp.lang.c++.moderated. First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|