How does D improve design practices over C++?

Michel Fortin michel.fortin at michelf.com
Sun Nov 9 05:17:41 PST 2008


On 2008-11-07 02:42:20 -0500, Walter Bright <newshound1 at digitalmars.com> said:

> The difference between D delegates and boost::bind for member functions 
> is that D delegates bind to the specific virtual function when the 
> delegate is created, while boost::bind binds when the delegate is 
> called. The former is, of course, more efficient when the delegate gets 
> called more than once.

But the later makes it possible to call the same member function on 
various object instances (which may resolve to different code for 
virtual functions). I find that capability lacking in D.

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




More information about the Digitalmars-d mailing list