On Thursday, 13 December 2018 at 23:33:39 UTC, Stanislav Blinov
wrote:
On Thursday, 13 December 2018 at 13:17:05 UTC, aliak wrote:
Ah. Is there any case where you would not want to do that when
you have a T value as parameter?
Hypothetically, yes, e.g. an object that contains references to
itself. However, D operates on the assumption that you don't
have such objects.
The spec actually forbids you creating self referencing structs.
DIP 1014 tackles that. For the spec, see
https://dlang.org/spec/garbage.html#pointers_and_gc