On Thursday, 18 February 2016 at 06:49:34 UTC, Daniel Murphy wrote:
It's not macroish string processing, it's embedding a subset of C++ declarations like a DSL. The difference is that the C++ can be fully type-checked and semantically analysed, errors will not leak into the generated source.

Ok, if you can resolve everything this way.

I agree that you end up spending way too much effort on bringing C++ into D, for it to be meaningful. My headerfiles used to be like 10-20% of my C++ source. Now it is at 40-50% of my C++ source... My C++ library code is at 90% header file only. Things like concepts will probably just ensure that this trend persists.

So I am not sure if interfacing with compiled C++ only is particularly useful. I think you need support for generating C++ source code stubs for interfacing so that you can use inlined non-instantiated C++ code (or just stick to C).

LLVM whole program optimization (linking LLVM IR) would "melt" it all together reasonably efficiently.

Reply via email to