|
Boost : |
From: Mat Marcus (mmarcus_at_[hidden])
Date: 2002-07-25 08:50:34
Mat>> Unfortunately, 'metafunction class' does not immediately
Mat>> bring meta(function object) to my mind.
Aleksey> It shouldn't. Just remember that it's a class, not a class template - that's
Aleksey> the most important point (it should be easy, since "class" is in the name
Aelksey> here :).
One more try...
RIght, I am aware that it is a class. I have no problem remebering what it does. I am trying to discuss pissible improvements in what the name suggests to the user. One of the MPL's strenghts is that it provides a language for metaprogramming. My intent in suggesting alternate names (quoted metafunction, metafunctor,...) is to try to help ensure that the language is in the domain of the user as opposed to the implementor (a DSL as opposed to an ICCL). The phrase metafunction class suggests an
implementation detail to me. Or even worse, it can be misread as "the class of the metafunction".
Why is the fact that it is a class and not a class template the most important point? To me the most important point is the the fact that this form of metafunction wrapping is what enables higher order metafunctions, i.e. this is how one metafunction can be returnedfrom another. You could argue that this same principal is captured at run time in the distinction between the word "function" and the word "function-object" or "functor". I was looking for a name which stressed this role, rather than
the (important) implementation detail that this is a class.
By the way, for the record, as evidenced by my comments and MPL tutorials in the past, I think MPL is a fine piece of work and I vote for formal acceptance into boost.
- Mat
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk