On Thursday, 30 December 2021 at 01:04:10 UTC, Ali Çehreli wrote:
The second item in the documentation mentions "any number of
default parameters" when describing copy constructor syntax:
https://dlang.org/spec/struct.html#struct-copy-constructor
1) I can't figure out how to use those extra
On Thursday, 30 December 2021 at 04:42:06 UTC, Tejas wrote:
On Thursday, 30 December 2021 at 01:04:10 UTC, Ali Çehreli
wrote:
The second item in the documentation mentions "any number of
default parameters" when describing copy constructor syntax:
https://dlang.org/spec/struct.html#struct-co
On Thursday, 30 December 2021 at 01:04:10 UTC, Ali Çehreli wrote:
The second item in the documentation mentions "any number of
default parameters" when describing copy constructor syntax:
https://dlang.org/spec/struct.html#struct-copy-constructor
1) I can't figure out how to use those extra
On Thursday, 30 December 2021 at 02:04:30 UTC, Ali Çehreli wrote:
On 12/29/21 5:14 PM, Paul Backus wrote:
Therefore, when you write your own copy constructors, you
should always use `inout` if possible, so that
compiler-generated copy constructors will be able to copy
instances of your struct
On 12/29/21 5:14 PM, Paul Backus wrote:
Therefore, when you write your own copy constructors, you should always
use `inout` if possible, so that compiler-generated copy constructors
will be able to copy instances of your struct that appear as members of
other structs.
Excellent point. I noti
On Thursday, 30 December 2021 at 01:04:10 UTC, Ali Çehreli wrote:
2) Unlike the examples there, I think the parameter should most
usefully be defined as 'const' unless there is a special reason:
struct S {
// const(S) instead of S:
this(ref const(S) that) {
}
}
Do you agree?
When the
The second item in the documentation mentions "any number of default
parameters" when describing copy constructor syntax:
https://dlang.org/spec/struct.html#struct-copy-constructor
1) I can't figure out how to use those extra parameters. For example, I
can't find a special function name to c