Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-03-01 18:52:55

"Brian McNamara" <lorgon_at_[hidden]> wrote in message
> 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
> Wow, thanks for these extensive comments. I appreciate the time you
> spent and the many concrete pieces of advice for improvement.

Glad to help.

> > B) Rather than having users define direct functoids, then
> > 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.
> > still needs adapters for foreign function objects, of course.) I
> > this could be done with macros, e.g.:
> >
> > struct plus {
> > // declare signature.
> > int operator() (int, int);
> > };


> 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
> 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

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?


Boost list run by bdawes at, gregod at, cpdaniel at, john at