About a month ago I started working on a PDD for how code should
be commented; some while later Paolo Molaro <[EMAIL PROTECTED]>
sumitted a draft PDD ('PDD X') on "Perl API conventions".

This gave me to think that, rather than accumulating lots of micro PDDs,
we should have a single one entitled "coding conventions" that includes
sections on naming and API conventions, how to comment code, etc etc.

Then the FAQs can simply state
"before you contribute src code, make sure you have thoroughly read PDD X".

Provisonally I think it should have the following sections:

* Coding style

largely lifted from Porting/patching.pod, eg function names start in
column 0, indent = 4, etc etc

* Naming conventions

how macros, variables (global or othewise), structs, files, APIs, plus
anything else you can think of, should be named.
- based on Paolo's work

* Commenting conventions

how individual items such as functions, macros etc should be commented,
plus how larger scale things (such as src files and implementation decisions)
should be commented.
- based on my work.

* Portability guidelines

The basic dos and donts of writing portable code, epcially with Perl in
mind - eg whether to assume ANSI C, things not to assume about int
sizes, and anything else you can think of.
- someone would need to write this.

* Performance guidelines

The basic dos and donts of writing code that runs well on modern processors,
eg the effect of caches and pipelines (avoid those branches, man!),
are globals Good or Evil (or Chaotic Neutral...).
- someone would need to write this.


Waddayafink? If people dont object, I'll begin drafting.


* Dave Mitchell, Senior Technical Consultant
* Fretwell-Downing Informatics Ltd, UK.  [EMAIL PROTECTED]
* Tel: +44 114 281 6113.                The usual disclaimers....
*
* Standards (n). Battle insignia or tribal totems



Reply via email to