On 21/09/11 12:58 AM, Timon Gehr wrote:
On 09/21/2011 01:37 AM, Walter Bright wrote:
(In contrast, C++ must invoke the copy constructor.)

C++11 rvalue references manage to make that effect somewhat less painful
though.

Less expensive computationally, yes, but the cost to the programmer is huge.

I'm willing to bet that the % of professional C++ programmers that could write (for example) std::vector, using move and copy semantics correctly, with all the correctness and exception safety guarantees, is incredibly low -- probably less than 1%.

In D, you just memcpy most of the time. It makes things so much easier.

And what do you lose? Internal pointers?

Who cares about internal pointers? They are so rarely used and easily replaceable that the overwhelming cost of supporting them is completely unjustified.

The disallowing of internal pointers is easily my #1 favourite feature of D.

Reply via email to