Boost logo

Boost :

Subject: Re: [boost] Assign V2 - first impression
From: Denis Shevchenko (for.dshevchenko_at_[hidden])
Date: 2011-06-23 03:21:56

Hello all!

I think Assign 2.0 is not simple library. It's not as technical view as just
first impression.

What is Boost.Assign? It's library for simplifying of programmer's life.
Moreover, it can do this simplifying quickly.

But I compare this:

vector<int> v;
v += 1,2,3,4,5,6,7,8,9;
map<string,int> m;
insert( m )( "Bar", 1 )( "Foo", 2 );

and this:

typedef std::map<std::string, int> map_; map_ cal;
typedef map_::value_type p_;

cal | do_csv_put<2>( "jan", 31, "feb", 28, "mar", 31 ),
<< lambda::bind( &p_::first, lambda::_1 ) << ':'
<< lambda::bind( &p_::second, lambda:: _1 ) << ' '
); // prints jan:31 feb:28 mar:31


Think about it: this is the first and the simplest example, i.e. "Hello
world". The man who does not know what is lambda::bind and not familiar with
the concept of adapters (with overloaded operator|) see this and think: "Is
this is a simplest example? And this is a library to simplify working with

I know there are libraries which is difficult to start using immediately.
Spirit, Proto and some other are really require a deep training. However,
these libraries are serious tools. If I want create my own DSEL - I must
study Proto deeply.

But libraries such as Assign 1.0 can be used immediately, and high
qualifications is not required for this. Novices don't starts with Proto,
they starts with Assign, etc.

And just imagine how this novice read this annotation:

"Filling containers with constant or generated data has never been easier."

What?? "Never been easier"? Are you kidding?

IMO, library that designed only for simplify the filling containers *MUST*
be simple.

- Denis

Boost list run by bdawes at, gregod at, cpdaniel at, john at