On Thursday, 28 April 2016 at 00:14:41 UTC, deadalnix wrote:
On Wednesday, 27 April 2016 at 17:04:47 UTC, Andrei
Alexandrescu wrote:
Yes, you get it exactly right. I think a DIP would be
warranted here to clarify how lambda equivalence is computed.
Could you please draft one? -- Andrei
More generally, it is not clear what is allowed to do for
merging functions. In C/C++ it is assumed that different
function MUST have different identities. Namely, if foo and bar
MUST have a different address.
It means that, even if foo and bar have the same body, you
can't merge them. Compiler can, however, emit a branch to foo's
body into bar or vice versa and it is alright.
This is a problem for us if we want to merge templates. I think
we should abolish this in D, to unlock more merging.
Seconded.