On Thursday, 25 October 2018 at 21:00:46 UTC, Adam D. Ruppe wrote:
On Thursday, 25 October 2018 at 19:56:18 UTC, Stanislav Blinov
wrote:
The current behavior of the compiler is quite the opposite of
those "same as" above.
Yeah, I guess I am maybe selectively reading the spec in light
of the i
On Thursday, 25 October 2018 at 19:56:18 UTC, Stanislav Blinov
wrote:
The current behavior of the compiler is quite the opposite of
those "same as" above.
Yeah, I guess I am maybe selectively reading the spec in light of
the implementation... but I think the examples are just sloppy.
Or maybe
On Thursday, 25 October 2018 at 13:22:36 UTC, Eduard Staniloiu
wrote:
The spec doesn't exactly say it uses memset, but it does imply
it:
https://dlang.org/spec/arrays.html#array-copying
talking about "aggressive parallel code optimizations than
possible with the serial semantics of C" and "
On Thursday, 25 October 2018 at 12:55:38 UTC, Adam D. Ruppe wrote:
On Thursday, 25 October 2018 at 12:25:37 UTC, Eduard Staniloiu
wrote:
IMHO, this is a bug. The code should lower to calls to
opAssing for types that define opAssign.
The spec doesn't exactly say it uses memset, but it does impl
On Thursday, 25 October 2018 at 13:01:06 UTC, Eduard Staniloiu
wrote:
On Thursday, 25 October 2018 at 12:38:44 UTC, Paul Backus wrote:
On Thursday, 25 October 2018 at 12:25:37 UTC, Eduard Staniloiu
wrote:
As I wrote in the comments above, I was expecting `a[] = b[]`
to iterate the slices and as
On Thursday, 25 October 2018 at 12:38:44 UTC, Paul Backus wrote:
On Thursday, 25 October 2018 at 12:25:37 UTC, Eduard Staniloiu
wrote:
As I wrote in the comments above, I was expecting `a[] = b[]`
to iterate the slices and assign the elements of b into a.
What really happens is a memcpy: as yo
On Thursday, 25 October 2018 at 12:25:37 UTC, Eduard Staniloiu
wrote:
IMHO, this is a bug. The code should lower to calls to opAssing
for types that define opAssign.
The spec doesn't exactly say it uses memset, but it does imply it:
https://dlang.org/spec/arrays.html#array-copying
talking abo
On Thursday, 25 October 2018 at 12:25:37 UTC, Eduard Staniloiu
wrote:
As I wrote in the comments above, I was expecting `a[] = b[]`
to iterate the slices and assign the elements of b into a.
What really happens is a memcpy: as you can see from godblot
[0], this gets lowered to a call to `_d_ar
Hello, everyone!
I have a question regarding the expected behaviour of the
built-in array's opSliceAssign.
Given the following code:
```
import std.stdio;
struct A
{
int x;
ref A opAssign(A rhs)
{
writefln("slice_bug.opAssign: begin");
return this;
}
}
void