On Saturday, 24 November 2012 at 20:47:17 UTC, Era Scarecrow
wrote:
This kind of behavior *really* needs to be documented in
precise detail, it's rather critical to know.
It IS documented. TDPL - pg. 248
[quote]
Thanks for pointing out where the postblit stuff is documented.
When I first started learning the language, I did read that part
a few times over, but I found it frustratingly hard to grasp. I
will re-read that section again.
TDPL is a good book, but it is not the official spec, nor is it
even a spec, it's a book that covers some aspects of how to use
the language. How copy and assignments work in D really needs to
be 100% documented in the language spec to ensure that it is
officially a part of the language and not a clever compiler
optimization that may or may not be implemented.
To make things much clearer, the documentation should perhaps
contain a flow chart showing the order of execution, with plenty
of examples that show edge cases and best practices.
--rt