How does D improve design practices over C++?
Bill Baxter
wbaxter at gmail.com
Thu Nov 6 20:32:45 PST 2008
> C++ is a huge language, and not many know the entire language. Case in
> point, you didn't know what Delegates where yet many C++ programmers use
> them frequently. Its better if the language makes it easy rather then
> requiring the programmer to do something to be correct. Just like expecting
> an email program to have spell check your emails. Modern languages should
> do the same.
C++ doesn't have "delegates". It has member function pointers. I
don't think that's changed. boost::bind (now std::tr1::bind in some
places) gives you a way to bundle a member function pointer with an
object pointer in a delegate-like way, but I don't think anybody calls
those delegates. At least they didn't used to.
I don't know who came up with the word "delegate" but I find it to be
a terrible match for what they actually are.
- "one appointed or elected to represent others"?
It's a kind of a stretch. [/rant]
--bb
More information about the Digitalmars-d
mailing list