[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: (c.harding 22644) Re: (c.harding 22613) int vs long in ldapex t-ldap-c-api-01



I also want to endorse the use of const in prototypes.  

It's not good enough to just specify const in the description; it should
be REQUIRED in the header files.  If not, it's impossible to use const
in applications using the API (unless one is will to cast it away on
every function call).  Use of const is a good programming practice that
should be encourgaged.  Users of older compilers can always define const
before including the header file.  Implementors of APIs who target
particular compilers can exclude const for those compliers which do not
support it.



> -----Original Message-----
> From: Kurt D. Zeilenga [mailto:Kurt@OpenLDAP.Org]
> Sent: Thursday, November 19, 1998 4:51 PM
> To: Chris Harding
> Cc: ietf-ldapext@netscape.com
> Subject: Re: (c.harding 22644) Re: (c.harding 22613) int vs long in
> ldapext-ldap-c-api-01
> 
... stuff deleted ...
> 
> The API should use prototypes and const modifiers to DESCRIBE the
> interface...  BUT implementors should be allowed to provide, at
> their discretion, implementations that are compatible with other
> languages (K&R C, latest ISO draft, Objective C, C++).
> 
> Kurt
>