ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] Re: FC++ formal review
by Jonathan Turkanis other posts by this author
Mar 1 2004 11:52PM messages near this date
[boost] Re: FC++ formal review | Re: [boost] Re: FC++ formal review
"Brian McNamara" <lorgon@[...].edu>  wrote in message
news:20040301225139.GA17066@[...]..
>  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.


Glad to help.


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



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Jonathan Turkanis
Jaakko Jarvi
Brian McNamara
Paul Mensonides
Jonathan Turkanis
Jonathan Turkanis
Brian McNamara
David B. Held
Gennadiy Rozental
Darren Cook
Gennadiy Rozental
Jonathan Turkanis

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved