Boost logo

Boost :

Subject: Re: [boost] Assign V2 - first impression
From: er (er.ci.2020_at_[hidden])
Date: 2011-06-24 05:24:18


> I am sure that it is a powerful library, but I really have no idea at all what is going on. I can't even parse the first line as valid C++ in any way. You need better examples, and also is that really the best way you could find to express repeating?

If I try to imagine what the interface would look like after taking into
account some of the suggestions that were made, this sentence:

"Create data elements by mapping 1, 10, 100, 1000 by function f, and
insert each result in cont by invoking modifier push_front."

translates to

(
    push_front<1>( cont ) % ( _data = f ) % ( _repeat = n )
)( 1, 10, 100, 1000 );

Questions :
- is it more readable, now?
- What if each example was preceded by its English equivalent. Is this a
bit of stretch or a reasonable approach?

Thanks.


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