On 1/10/14 12:53 AM, monarch_dodra wrote:
On Friday, 10 January 2014 at 08:27:42 UTC, Andrei Alexandrescu wrote:
It's an outrage, and this particular combination of (mis)features has
never got to my attention until now.
I've submitted https://d.puremagic.com/issues/show_bug.cgi?id=11889 on
your behalf. I've also sent out the fix
https://github.com/D-Programming-Language/phobos/pull/1845 for review.
(It's simple, but perhaps I'm missing some subtler issues.)
Apologies for this!
Andrei
Array returns a value by design.
It's my design. The rationale for returning by value has since vanished.
The idea was to make impossible to take addresses of elements inside
containers (I still plan to write an article "sealed containers" at some
point). However, Walter and I decided to ban taking the address of ref
returns since (currently not enforced).
Andrei