From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2008-05-12 17:38:55
>Frankly, I dont know. My sense is that the pre-C++0x (is it 09?) way of
>dealing with no concept maps is to express concepts in terms of free
>functions and metafunctions. It looks like this is how boost libraries
>like boost Graph or Fusion deal with the issue.
>Still, I am curious about this approach to faking a concept_map, it
>looks like it could turn out to be something I like.
>I just dont want the "point_traits" approach used for adapting (or
>faking a concept map) to spill over into the concept itself. I continue
>to think thate the concept checking class should require only
>metafunctions and free functions if we want to support a nonintrusive
>way to adapt exising pointtypes.
My thinking was similar to Bruno's in that I had a concept map in mind.
I was also thinking about how the library is used and what is easier for
the user. Is it easier to the user to specialize one traits class or
several metafunctions? If a user is more likely to understand that they
need to provide a complete specialization of a traits class than that
they need to specialize all relevant meta-functions. This ease of use
argument breaks down as we start pouring extra stuff into the traits.
This is similar to the kind of OO code bloat that happens when people
fail to maintain objects well and allow the scope of an object to grow
instead of breaking it down into separate objects. From that standpoint
I also agree with Bruno that the solution is to have more smaller
concept_map/traits classes instead of uber-generic all encompassing ones
that try to cover too much ground and end up confusing users with a
bunch of stuff they don't need or understand because they are only
interested in some small portion of what's there.
So, we can envision two different tacks to take with this point concept.
One is to make one point concept for all types of points (2D, 3D,
homogeneous points, 11D simplified string theory points, etc.) or we can
have a separate concept for each conceptual type of point and separate
traits classes for each. We can have inheritance between concepts, 3D
point could inherit from 2D point concept, for instance. Having free
functions and meta functions instead of traits might lead us in the
direction of good design, but I don't think it is a prerequisite. Good
OO design is probably achievable.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk