[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To gh_ or not to gh_?

From: Neil Jerram
Subject: Re: To gh_ or not to gh_?
Date: 15 May 2001 19:27:30 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Lars" == Lars J Aas <address@hidden> writes:

    Lars> On Mon, May 14, 2001 at 03:10:11PM -0500, Rob Browning
    Lars> wrote: : Neil Jerram <address@hidden> writes: : >
    Lars> That's a strange assertion.  Why do you say this?
    Lars> : 
    Lars> : Maybe he means they should always be hidden behind a C
    Lars> api?  In

    Lars> Yes, that's what I meant.  If you use opaque datatypes and
    Lars> access methods you will generally have a more stable
    Lars> interface (easy to maintain binary compatibility compared to
    Lars> when exposing internals).  If you check out the libtool
    Lars> manual, there are some useful hints related to deciding on
    Lars> library interfaces.  I'd add some points to the list though
    Lars> (like writing your interfaces in a "functional" way so you
    Lars> can translate them to scheme without using call-with-values
    Lars> :).

Thanks - in such cases, I agree.  But what about cases where you want
to use a struct to group related parameters, and that struct is
documented as part of the interface.  E.g. struct sockaddr_in in the
sockets interface, or XEvent in Xlib?  Would you argue against those
as well?

I'll also check out the hints in the libtool manual - thanks for the


reply via email to

[Prev in Thread] Current Thread [Next in Thread]