Initialise dynamic array in array of structures
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jun 22 01:06:26 PDT 2016
On Wednesday, 22 June 2016 at 06:43:12 UTC, Paul wrote:
> Why is initialisation via {} bad (in simple terms please :D)?
first, it is buggy. i.e. it doesn't always call postblit[1].
second, it's syntax is the same as the syntax of argument-less
lambda, which makes it context-dependent -- so reader has to make
some mental efforts to find out if it is really lambda or struct
initialization.
for me, it is enough to see it as bad. and for some other people
too. ;-)
[1] https://issues.dlang.org/show_bug.cgi?id=16146
More information about the Digitalmars-d-learn
mailing list