Do you think if statement as expression would be nice to have in D?

Walter Bright newshound2 at digitalmars.com
Tue Jun 7 01:24:07 UTC 2022


On 6/6/2022 10:07 AM, deadalnix wrote:
> LDC is able to inline the lambda and then optimize away the allocation. DMD is not.

DMD can inline it now:

https://issues.dlang.org/show_bug.cgi?id=23165
https://github.com/dlang/dmd/pull/14190

There is a persistent idea that there is something fundamentally wrong with DMD. 
There isn't. It's just that optimization involves an accumulation of a large 
number of special cases, and clang has a lot of people adding special cases.

The not-special-case major optimization algorithms that do data flow analysis, 
dmd has.


More information about the Digitalmars-d mailing list