On Saturday, 9 February 2019 at 00:04:20 UTC, Dennis wrote:
On Friday, 8 February 2019 at 23:58:49 UTC, H. S. Teoh wrote:
Yep, the moral of the story is, if codegen quality is
important to you, use ldc (and presumably gdc too) rather than
dmd.
That's definitely true, but that leaves the question whether
lowering rvalue references to lambdas is acceptable. There's
the 'dmd for fast builds, gdc/ldc for fast code' motto, but if
your debug builds of your game make it run at 15 fps it becomes
unusable. I don't want the gap between dmd and compilers with
modern back-ends to widen.
Since the user doesn't explicitly place the lambda in their code,
wouldn't it be justifiable for the compiler to take it back out
again at a later step in compilation, even in debug mode?