Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-08 13:39:47


Brian McNamara <lorgon_at_[hidden]> writes:

> I would like to request a formal review of FC++. I have put the library
> source in the YahooGroups files:
> http://groups.yahoo.com/group/boost/files/
> as "fcpp.zip".
>
> The documentation is available at
> http://www.cc.gatech.edu/~yannis/fc++/boostpaper/
> in a few different formats.

I just started looking this over, and I have only two comments so far:

1. The docs are much improved in approachability! Great job on the
   rewrite!

2. I strongly urge that you review the conventions used for
interoperability with the MPL's idioms. For example, the definition
of mymap from the examples might be:

  struct mymap_type
  {
      template <class F, class L>
      struct apply
      {
         typedef list<
             typename mpl::apply<F,typename L::value_type>::type
>
         type;
      };

      template <class F, class T>
      typename mpl::apply< F, list<T> >::type
      operator()( F some_func, list<T> some_list ) const { ... }
   } mymap;

The use of a nested "::apply<>" instead of a nested "::sig<>" makes
mymap_type into a *metafunction class*, and the use of a nested
"::type" within "::apply" makes it into a *metafunction*. I'm almost
certain that you could take advantage of MPL with these conventions
within FC++ for a substantial reduction in code and complexity, and
a corresponding increase in portability.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk