(I'll answer here anyway just in case someone lands here via a
web search.)
On Thursday, 30 January 2020 at 10:31:08 UTC, mark wrote:
Why is this a *copy*? (For a copy (in C++) I'd have expected
return *this.)
In C++, `this` is a pointer, but in D, it is a reference. So
assignment follows th
In the D Cookbook it has as part of the FibonacciRange example:
@property FibonacciRange save() { return this; }
And in the description it says:
"...save, which returns a new range that is a copy of the current
range and can be advanced independently..."
Why is this a *copy*? (For a copy (in
On Thursday, 30 January 2020 at 10:31:08 UTC, mark wrote:
In the D Cookbook it has as part of the FibonacciRange example:
@property FibonacciRange save() { return this; }
And in the description it says:
"...save, which returns a new range that is a copy of the
current range and can be advance