On Tuesday, 1 August 2017 at 22:47:24 UTC, Nordlöw wrote:
Given the `struct S` with lots of data fields, I've written the
following functional way of initializing only a subset of the
members in an instance of `S`:
struct S
{
[...]
}
Now the question becomes: will the S-copying inside `wi
Given the `struct S` with lots of data fields, I've written the
following functional way of initializing only a subset of the
members in an instance of `S`:
struct S
{
int i;
float f;
...
this(int i) { this.i = i; }
S withF(float f)
{
// will this be optimized