Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-03-03 18:35:03

David Abrahams wrote:
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>> It sure would've been nice to be able to write _2.count, or
>> count(_2), or _2.count(), but we can't, so we bind(). ;-) The
>> regular syntax has its advantages, and the initial "member pointer
>> first" surprise is a one-time adjustment.
> It's an issue of how far the language is, mentally, from the domain
> abstraction it represents.
> _2.member(&X::count)
> maps more directly to
> _2.count
> than
> bind(&X::count,_2)
> does. For me.

Yep, but you are optimizing the rare "public member" case. Are you going to
introduce new syntax for count(_2) and _2.count() as well?

    bind(count, _2)
    bind(&X::count, _2)

That's the regularity I spoke of.

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