c) Totally hide the structure to the compiler, by just giving
            to it a forward-declaration and the defining it in the .c
            that actually creates the instances, so we don't tempt it
            to make weird optimizations based on his knowledge about
            the structure or the user to see it (the distributed .h
            headers would no contain any information about the
            structure).

I think that I like this idea, but I would like to hear the opinion of
other people before to take any decision about this issue.

I like it, yes. In this way those types will really be 'opaque' to the program using the library; and there is no possibility to use the internals of a given type (assuming it's a structure) in a way not defined in the API.

Cheers,
-Aleksander


Reply via email to