[OPEN-ILS-DEV] Function naming conventions

Bill Erickson erickson at esilibrary.com
Mon Oct 29 09:32:01 EDT 2007


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