Use case for std.bind

Michel Fortin michel.fortin at michelf.com
Wed Feb 25 18:17:11 PST 2009


On 2009-02-25 14:36:43 -0500, "Denis Koroskin" <2korden at gmail.com> said:

> With built-in D delegate syntax, there is no ambiguity and mistake:
> auto x = (int x) { foo(x, 42); };
> 
> That's *the best* syntax I can think of. Just keep it and let the 
> std.bind  go. Don't waste your precious time of fixing something that 
> isn't broken  (err.. std.bind IS broken, but that's not what I was 
> talking about :p)

I pretty much agree with this. What's great about this is that you just 
reuse your knowleadge of functions instead of having to learn something 
new. The mental load is thus smaller; this is much more important than 
saving a few characters.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list