Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-04 09:44:17


Aleksey Gurtovoy <agurtovoy_at_[hidden]> writes:

> Hi all,
>
> How would you call an 'apply' counterpart that takes a metafunction class
> and a _sequence_ of arguments, i.e.:
>
> typedef list_c<int,5,0> args;
> typedef apply_tuple< plus<>, args >::type sum; // this one
> BOOST_STATIC_ASSERT(sum::value == 5);
>
> ?

I don't know. In Python, the one that takes an argument tuple is
called "apply", and the other one is called "function call syntax" ;-)

> If it was run-time C++, I would be happy with 'apply_tuple', but in MPL
> domain "tuple" isn't really the right word, and I don't like 'apply_seq' or,
> worse yet, 'apply_sequence'. Or should it be 'seq_apply' (from an English
> language standpoint)?
>
> Anyway, suggestions and opinions are welcome!

I'm afraid I'm stumped also.
If you were willing to make a massive change, I'd suggest:

   call this one 'apply'
   call the other one 'call' or 'invoke'

Though I don't particularly like it. Why is 'apply' more appropriate
for this one, other than consistency with some other language?

I think 'apply_args' sounds right, though they both let you specify
arguments. Maybe 'apply_arg_sequence' is appropriate?

-Dave

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

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