|
Boost Users : |
From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2006-05-12 17:46:04
"jbd" <evadream.mlist_at_[hidden]> wrote
>> Peter Dimov wrote:
>> It isn't clear why do you need to bind bar2 at all, instead of just
>> using boost::function < void (int) > f3( &bar2 ) ;
>
>To make a long story short, i'd like people
>always use the same mecanism (syntax), not a boost::bind here and nothing
>there.
I would disagree with this approach. First it introduces unnecessary
runtime and compile time performance overhead. More importantly, as great
as boost::bind is, it is just a mechanism for making function objects.
There are other mechanisms, like, for example, STL binders and adapters,
boost::lambda or writing your own function object. A function pointer can
be used directly, since function objects are modeled after it in the first
place.
Using boost::bind when it is not required might produce the code that is
more difficult to understand and maintain.
Regards,
Arkadiy
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net