Business object coding conventions
Derek Atkins
warlord at MIT.EDU
Tue Dec 7 16:50:51 EST 2004
Rich Johnson <rjohnson at dogstar-interactive.com> writes:
> However, I will quibble with the 'documented in the files' part.
> What's there is pretty skimpy. FWIW, I'm a fan of _explicit_
> declaration of conventions and expectations. I've spent far too much
> time chasing down bugs ultimately attributable to misunderstood
> assumptions.
I dont think it's that challenging to divine that between foo.h and
fooP.h the latter is private.
> AFAIK the conventions used are implicit and not documented, either
> in the code or elsewhere. The 'private' aspect is documented only in
> a few of the *P.h headers and the absence of any 'public' declarations
> implies public unless specified otherwise. I agree that the pattern
> used for the most part matches that of basic opaque object programming
> (aka data abstraction/hiding for C)--but it isn't stated anywhere.
Eh.. Welcome to the world of open source projects that have had
multiple generations of developers.
> But now it's on the record; so I'm happy :-)
Oh, if documentation in email is sufficient, you didn't search well
enough. I'm certainly this was mentioned on the -devel list several
years ago.
> There're also _two_ naming conventions at play: the aforementioned
> StudlyCap "*P.h", and the "*-p.h" convention used for qof* objects.
> The use of one or another appears to be historical. Is one preferred
> over the other for new work? Or should one stick to the predominate
> convention for the directory at hand?
The latter, stick to the predominant convention of the directory.
Did you read the HACKING file?
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list