[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PenguinPlay.h

s369625@student.uq.edu.au wrote:

>>>We don't have a convention.  _SampeCapitalizationAsFilename_h is just my own
>>>habit.  Yes we should have a coding standard.  (No indentation flamewars
>>Ok, I'll send a mail with a rough draft for discusson later.
>Ah, I sent put a draft of my own into the web pages.  I attached a copy
>to one of my stupidly lost mails.  Here, I'll do it again.

Well, fortunately I hadn't started with my version yet ;)

Ok, some comments on your draft:

1) It's in HTML, right? I just ask because of the, well, slightly extended
header ("Indentation ..."), the "<ul> ... <ul>" list and the slightly
inefficient "#include <PenguinPlay/FileName.h>" ;)

2) "except class members are capForStartOfAllButTheFirstWord. I think this
is insane because". I agree. It is insane. BTW - I always use the
AllWordsStartWithCaps version.

3) "_every_ PPlay header file is to be gotten by: #include
<PenguinPlay/FileName.h>"  and  "So ppgGC is in ppgGC.h. I think this is
the simplest thing, but most people seem to used small letters, so ppgGC
would be gc.h."
I would prefer #include <PenguinPlay/Gfx/gc.h> (or .../GC.h), i.e. resolving
the prefixes into subdirs.

4) "I suggest maybe "_PF_BASNAME_H" for the file "pfBaseName.h", where pf
is the prefix." Agreed. One more vote for that.

5) "I don't like tabs, they only cause trouble for people with different
tab stops on thier editors, no matter how hard you try to get it right."
Hmm, my editor (fte) is using tabs only for indenting at the start of the
line. Everything else is done via spaces. That way it stays consistent
regardless of the tab size. At least 95% of the time. And having tabs at
the start of the line makes editing easier IMHO.

>>I mean having
>>ppuXXX for
>>unsigned XXX
>>In some places this makes code a bit more readable (e.g. in function heads
>>with many unsigned parameters), but I don't know if it's worth the effort.
>I don't see a problem with them.

Well, it's quite some macros (especially if you also want to have shortcuts
for static and const and all combinations ;), but that's also the only
problem I see. In other words - I really don't have an opinion about this

>>Well, the normal C floating-point type is "double" - but we'd need "thrice"
>>for god (at least for the christian one)...
>"triple" you mean.

Uh, yes <ashamed>


REALITY.SYS corrupted ... reboot Universe [Y,n]?