
"Brian McNamara" <lorgon@cc.gatech.edu> wrote in message news:20040301225139.GA17066@lennon.cc.gatech.edu...
On Sun, Feb 29, 2004 at 11:51:28PM -0700, Jonathan Turkanis wrote:
Here is my formal review of FC++ -- sorry to wait to the last minute.
Wow, thanks for these extensive comments. I appreciate the time you spent and the many concrete pieces of advice for improvement.
B) Rather than having users define direct functoids, then wrapping them in full functoids when they want to take advantage of 'sugar', it should be made easy to define full funtoids, so that all function objects designed for use with FC++ can be expected to be full. (One still needs adapters for foreign function objects, of course.) I
Glad to help. think
this could be done with macros, e.g.:
struct plus { // declare signature. BOOST_FCPP_LAMBDA_SUPPORT(2, plus) int operator() (int, int); };
<snip>
What's the motivation for this change? I am all for reducing boilerplate code, but I am unclear is that is the only reason you're suggesting this, or if there's another reason you want to avoid the "wrapping" mechanism in the current implementation. (I like the idea of "full-ness" being "just another combinator" (make_fullN).)
I guess you could describe it as eliminating boilerplate code. Let me try to explain my thoughts better. If I were writing functoids for use with FC++, I would want be able to use them freely in lambda expressions without using adapters. So I would write a direct functoid, giving it a name to reflect that it is an implementation detail, and then use the template 'full' to define the version of the functoid which I would actually use. In my opinion, this adds an unnecessary step, and forces me to think of a name for an intermediate entity that I will never use directly. I'd rather let the concept of a 'full' functoid be the standard concept, and have tools which allow me to construct models of that concept. I understand that you formulated the concept of a direct functoid because there is a lot that can be done in FC++ using functoids which are only direct, not full, so requiring full functois everywhere would be overspecification. However, I think for maximal reuse I would always want full functoids. Does this make sense? Jonathan