[OPEN-ILS-DEV] Function naming conventions

Scott McKellar mck9 at swbell.net
Fri Nov 23 09:24:42 EST 2007


Along the same lines: in osrf_app_session.h there are two different
typedefs for the same struct: osrf_app_request and osrfAppRequest.

There are also two other typedefs for a different struct:
osrf_app_session and osrfAppSession.

Unless I hear otherwise, I shall assume that the camelCase version
is preferred to the lower_case_with_underscores version.

Scott McKellar
http://home.swbell.net/mck9/ct/

--- Bill Erickson <erickson at esilibrary.com> wrote:

> Scott McKellar wrote:
> > In a number of cases I have found pairs of functions with similar
> > names, where one is lower case with underscores ("foo_bar") and the
> > other is camel case ("fooBar").  One way or another they execute
> > the same underlying code, so they are effectively just different 
> > spellings of the same function.
> >
> > For example, in osrf_app_session.c, osrfAppSessionMakeLocaleRequest
> > simply passes all of its arguments to
> osrf_app_session_make_locale_req
> > and returns the result.
> >
> > My guess is that these redundancies reflect an incomplete
> transition
> > to a consistent naming convention.  However I can't guess which
> > convention is preferred and which is deprecated.  If you'll tell me
> > which is which, I can add this cleanup to my janitorial agenda.
> >   
> Exactly...  It was an incomplete transition to the camelcase 
> (osrfAppSessionMakeLocalRequest) style of function names.  Naturally,
> it 
> wasn't terribly high on the priority list.
> > Or maybe you'd rather I left things alone.
> >   
> Never! ;)
> 
> Thanks, Scott.
> 
> -bill
> 
> -- 
> Bill Erickson
> | VP, Software Development & Integration
> | Equinox Software, Inc. / The Evergreen Experts
> | phone: 877-OPEN-ILS (673-6457)
> | email: erickson at esilibrary.com
> | web: http://esilibrary.com
> 
> 



More information about the Open-ils-dev mailing list