httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@leland.Stanford.EDU>
Subject Re: Naming conventions for 2.* (and maybe 1.3+?)
Date Sat, 24 Jan 1998 19:59:17 GMT
On Sat, 24 Jan 1998, Rodent of Unusual Size wrote:

> I'm starting a new thread for this; the previous discussion
> was buried under a call for a new beta - not easy to find.
> It seems to me that it would be nice to go into 2.0 work with some
> naming conventions.  As a straw man, here are things for which I think
> we need name prefixes:

Yes, 2.0 does need naming conventions. This is something that I've been
planning on working on as part of the 2.0 API rewrite that's coagulating
in my brain, but I don't have enough spare time to write it down or code

>  1. Apache-originated/rewritten functions that aren't tied to the httpd
>     project (e.g., ap_cpstrn(), ap_snprintf(), ...)
>  2. Apache httpd public interfaces (the module API)

I always thought this distinction was rather silly. If we want module
authors to use a function, how do we distinguish between "functions that
aren't tied to the httpd project" and "httpd public interfaces." The fact
is, you can't. While rprintf() is no doubt in the second class, and
snprintf() is no doubt in the first, where does no2slash() fall? It
doesn't care about Apache, it's just a generic utility function that
removes slashes. But it seems very HTTP-ish to me.

>  3. Apache httpd private interfaces (such as new_connection())
> Any other case for which guidelines would be useful?  Platform-specific
> stuff, perhaps?

Well, right now we have os_* prefixed stuff, but I've always thought that
was kind of silly.

> My first thoughts for these are
>  1. ap_xxx()
>  2. apapi_xxx()  (why not?  there's nsapi and isapi..)
>  3. httpd_xxx()

No, no and maybe. They are ugly names. I do not want ugly names in our
public API. As I said, I don't mind a few ap_ functions here and there,
because there is no real coherency to our naming right now, but I really
do not like that combination of characters, and apapi is much much worse.

Personally, I kind of like "apache_", but maybe I've been hanging out with
Java too much; it is a bit long.

Which reminds me: ANSI/ISO C says that all external names should be unique
in their first six characters. ROTFL ;)

-- Alexei Kosut <> <>
   Stanford University, Class of 2001 * Apache <> *

View raw message