On 14 December 2013 02:50, Dicebot <[email protected]> wrote: > On Friday, 13 December 2013 at 16:28:33 UTC, Manu wrote: > >> I could still REALLY do with __forceinline though. D doesn't have an >> effective macro. >> Obviously, if by 'language X' you mean 'any non-compiled language with >> pointers', then I totally agree! People who make claims like you say, >> don't >> generally know what they're talking about, or what C is actually used for. >> > > I believe (and have posted it over 100 times in NG already :P) D > absolutely needs either way to force internal linkage or good LTO symbol > elimination. Without preprocessor there is not much you can do to eliminate > code duplication other than templates / CTFE - and it bloats resulting > executables damn lot, something that was very controllable in C. >
templates aren't guaranteed to inline, and they produce horrible symbol bloat. ctfe isn't inlining, it's pre-computation/runtime elimination. mixin is the closest, but it can't be used effectively in expressions, is horribly dangerous and generally horrible, and requires much keyword pollution. We really do need __forceinline. Walter did agreed on one occasion. He said something like "I've been thinking on it, and I think you might be right", which is almost a mental commitment... so there's hope! :P Sadly it was in a hotel parking lot, and not committed to the eternal historic record (ie, the forum). The alt-compilers have an attribute... if only we could alias attributes (or groups of attributes). Another thing we need... :/
