-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> variable naming conventions are not enforced by the compiler; they
> could be misleading.  why not use an ide - e.g.  eclipse is available
> for many platforms - or just document the code.  using cweb will
> exhibit your STRONG commitment to good documentation :)
>

I used to have a problem deciding how to keep track of
IN and OUT arguments in functions. Rather than bothering
to clutter up prototypes with names, I came up with this
simple technique:

        for
                anyfunction(IN * A, IN * B, IN * C, OUT * A)

Variables used as input to the given function will be sent
first, in alphabetical order by type. Output variables will be
sent next, alphabetically by type.

Thus,
        str->dup(char *, char ** );

Even without the second indirection giving us an obvious
clue, we know that the first variable is input and the second
is output.

Because I stick to this as a strict part of my API, I never have
to check the source to remind myself what I'm doing.

Just thought I'd give my two cents.

Don "north" Bailey



-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.6 (Build 6060)

iQA/AwUBREP94V/Ie1ANMtLuEQIVtQCfVWiWpqI6Tm0/mhhGFYGw82vPdJMAn24k
t6Kdoj1SWPR9iuSEGOc1/NGd
=6JoQ
-----END PGP SIGNATURE-----

Reply via email to