On Friday, 11 September 2015 at 20:25:19 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 11 September 2015 at 11:44:13 UTC, Russel Winder
wrote:
For example https://issues.dlang.org/show_bug.cgi?id=5710
If C++ interop is still important, maybe it would be a good
idea to adopt C++ style lambdas.
How would that help with interop? Even if we supported passing a
lambda to C++ code, the syntax wouldn't need to match, just the
semantics, and that could be done without adopting C++ style
lambdas in D. However, given the complexity of C++ templates, as
I understand it, there are no plans to ever support them in C++
interop (since it would pretty much mean putting a C++ compiler
in the D compiler), in which case, there's no need to worry about
C++ lambdas anyway, because they all involve templates.
So, while C++ interop is important, and it's gotten some major
improvements in the process of switching to D for the compiler
front-end (and will likely continue to get improvements), there
are still some pretty severe limits on what we're going to be
able to do if we don't want to put a full C++ compiler inside of
the D compiler, and we really don't want to be doing that.
- Jonathan M Davis