Use case for std.bind

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Feb 25 16:21:22 PST 2009


Jason House wrote:
> The first follow-up to your reply captured the kind of messiness bind
> can bring in C++. So far, all your examples are trivial (lack
> argument reordering, function composition, etc...). It's true that
> your examples look clean, but the devil will be in the details.

I see. The only problem is that very few people seem to use std.bind; 
there are few interesting examples of arbitrary partial argument binding 
that need formalization. The one good example I know of is those float 
vector permutations, but nobody in their right mind would use a delegate 
for that!

That all makes it even more appealing to stick with a five-liner in 
std.functional that gets currying into the bag (which is a useful and 
low-hanging fruit) and call std.bind history. Makes sense?


Andrei



More information about the Digitalmars-d mailing list