On 26 Sep 2015 6:27 am, "Manu via Digitalmars-d" <digitalmars-d@puremagic.com> wrote:
>
> On 25 September 2015 at 01:47, David Nadlinger via Digitalmars-d
> <digitalmars-d@puremagic.com> wrote:
> > Hi all,
> >
> > [...]
> > our resident Mr. Why-Can't-D-Be-More-Like-C++, Manu Evans
>
> Bah, I'm not sure what this means. If you mean I advocate for things
> that are perfect how they are in C/C++, precedented by decades of use
> and millions of developers, remaining as people expect them to be...
> then yes.
> C++ didn't get *everything* wrong, otherwise D wouldn't be so much
> like C++ to begin with. __forceinline in C++ is exactly what people
> want here. The behaviour is useful, and well understood; compiler will
> always inline if possible, and warn if it can't. There's nothing wrong
> with C++ in this case, and I wish D would just be the same.
>
> I'm happy for DMD to not inline anything in debug if it's technically
> impossible due to compiler architecture, but it's not useful as an
> error, that just forces you to remove it from your code if you want it
> to compile.
Not sure of oddness of dmd, but there should be only a few reasons why a function is uninlinable, all of them being low level things such as inline assembly, calls to alloca. Assuming that the function body is available at compile-time too. ;-)