inlining...

Daniel Murphy yebbliesnospam at gmail.com
Fri Mar 14 21:33:32 PDT 2014


"Manu" <turkeyman at gmail.com> wrote in message 
news:mailman.128.1394856947.23258.digitalmars-d at puremagic.com...

> > Haven't we already agreed a pragma for force inline should be 
> > implemented. Or is
> > that something I have dreamed?
>
> It's been discussed. I never agreed to it (I _really_ don't like it), but 
> I'll take it if it's the best
> I'm gonna get.
>
> I don't like stateful attributes like that. I think it's error prone, 
> especially when it's silent.
> 'private:' for instance will complain if you write a new function in an 
> area influenced by the
> private state and try and call it from elsewhere; ie, you know you made 
> the mistake.
> If you write a new function in an area influenced by the forceinline state 
> which wasn't intended
> to be inlined, you won't know. I think that's dangerous.

Huh?  The pragma could easily be restricted to apply to exactly one function 
declaration, if that's what's desired. 



More information about the Digitalmars-d mailing list