You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ryan Bloom <rb...@raleigh.ibm.com> on 1999/02/23 18:53:56 UTC

Function and type names.

I want to make a decision about APR naming conventions before I get too
deep in implementing functions.  I am therefore making a few suggestions,
so that I don't have to re-name all the types and functions later.

Suggestion 1)
     types:           apr_foo_t
     functions:       apr_bar
     macros & #defs:  APR_STUFF


Suggestion 2)
     types:           apr_foo
     functions:       apr_bar
     macros & #defs:  APR_STUFF

Suggestion 3)
     types:           APRFoo
     functions:       apr_bar
     macros & #defs:  APR_STUFF

Suggestion 4)
     types:           APR_foo
     functions:       apr_bar
     macros & #defs:  APR_STUFF

Personnaly, I vote for #1 or #2.  I really don't care which, but I would
love to get this issue resolved, soon.

Ryan


_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	


Re: Function and type names.

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Ryan Bloom wrote:
> 
> I want to make a decision about APR naming conventions before I get too
> deep in implementing functions.  I am therefore making a few suggestions,
> so that I don't have to re-name all the types and functions later.
> 
> Suggestion 1)
>      types:           apr_foo_t
>      functions:       apr_bar
>      macros & #defs:  APR_STUFF

+1 for #1.
-- 
#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Re: Function and type names.

Posted by Ben Hyde <bh...@pobox.com>.
Ryan Bloom writes:
>
>I want to make a decision about APR naming conventions before I get too
>deep in implementing functions.  I am therefore making a few suggestions,
>so that I don't have to re-name all the types and functions later.
>
>Suggestion 1)
>     types:           apr_foo_t
>     functions:       apr_bar
>     macros & #defs:  APR_STUFF

This is fine.

I'd rather have it be ap_foo so we can migrate functions
out of apache and into apr without having to rewrite 
everything.

For example if we decide to break off a chunk of alloc.c
and move it down to apr (where it belongs!) then ap_ makes
that a lot easier since we can start very small and move
tiny bits as seems useful over time.

The _t seems redundant denotation in C.

 - ben

Re: Function and type names.

Posted by Manoj Kasichainula <ma...@io.com>.
On Wed, Feb 24, 1999 at 11:05:32PM +0000, Ben Laurie wrote:
> Ryan Bloom wrote:
> > Suggestion 3)
> >      types:           APRFoo
> >      functions:       apr_bar
> >      macros & #defs:  APR_STUFF
> 
> I like this for types, but functions should also be that way (or maybe
> aprBar?). Past experience suggests that my preference is the kiss of
> death :-) (cf. Apache Style Guide).

I was the reason that #3 was originally in the APR spec. I like it
because I like the at-a-glance separation of types and functions.
IMO, it makes code easier to read.

-- 
Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
"Stocks said 'boo' today..." - Okito Toyoda of NHK on Halloween '96 

Re: Function and type names.

Posted by Ben Laurie <be...@algroup.co.uk>.
Ryan Bloom wrote:
> Suggestion 3)
>      types:           APRFoo
>      functions:       apr_bar
>      macros & #defs:  APR_STUFF

I like this for types, but functions should also be that way (or maybe
aprBar?). Past experience suggests that my preference is the kiss of
death :-) (cf. Apache Style Guide).

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

RE: Function and type names.

Posted by Brad Fitzpatrick <br...@bradfitz.com>.
For readability, #1.

-----Original Message-----
From: new-httpd-owner@apache.org [mailto:new-httpd-owner@apache.org]On
Behalf Of Ryan Bloom
Sent: Tuesday, February 23, 1999 9:54 AM
To: new-httpd@apache.org
Subject: Function and type names.



I want to make a decision about APR naming conventions before I get too
deep in implementing functions.  I am therefore making a few suggestions,
so that I don't have to re-name all the types and functions later.

Suggestion 1)
     types:           apr_foo_t
     functions:       apr_bar
     macros & #defs:  APR_STUFF


Suggestion 2)
     types:           apr_foo
     functions:       apr_bar
     macros & #defs:  APR_STUFF

Suggestion 3)
     types:           APRFoo
     functions:       apr_bar
     macros & #defs:  APR_STUFF

Suggestion 4)
     types:           APR_foo
     functions:       apr_bar
     macros & #defs:  APR_STUFF

Personnaly, I vote for #1 or #2.  I really don't care which, but I would
love to get this issue resolved, soon.

Ryan


_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.