Library standardization

Sean Kelly sean at invisibleduck.org
Sat Apr 19 08:37:20 PDT 2008


== Quote from Janice Caron (caron800 at googlemail.com)'s article
> On 19/04/2008, e-t172 <e-t172 at akegroup.org> wrote:
> >  If I understand your statement correctly, it means the D compiler decides
> > on its own whether to inline a function or not.
> That is correct. The rationale is that the compiler is able to make
> better optimisation decisions than the programmer.

Except sometimes the programmer doesn't want code exposed, even if
it means faster execution.

> > I don't think it's a good
> > idea, because it will lead to very strange problems and unexpected behaviour
> > when dealing with shared libraries.
> It's an optimisation decision, so it should make no difference
> whatsoever, except to make your code run faster or slower.

Exposing implementation can also have implementation changes cause
client code to have to be recompiled, and there is more risk of headers
getting out of sync.  I think the synchronization issue is what he meant
by strange problems.


Sean



More information about the Digitalmars-d mailing list