Re: [Fresco-devel] Coding guidelines, again
Tobias Hunger <[email protected]>
| Newsgroups | gmane.comp.video.fresco.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 07 August 2002 23:12, Nathaniel Smith wrote: > This thread died out, and some people on IRC were asking about the > latest draft, and I would like more comments, so I'm attaching the > latest copy of the draft coding guidelines. Suggestions, flames, etc. > welcomed. There is something I keep getting upset about that is not mentioned in the draft. I'm a bit uncetain wether this belongs in to a coding standard or not, it is basically common sense. On the other hand so are most of the other things mentioned;-) Only #include the headers needed, include them where they are needed, try to stay away from 'include-everything' headers like libart.h (which includes every other header defined in libart_lgpl). Use forward declarations where possible. This means for example that you should include <iosfwd> where possible when working with streams. Justification: Keeps the compilation units small, thus speeding up the compilatiion. Since include-files tend to depend on other includes this speedup can be dramatic. It further spares the programmer to wade through lots of unnecessary include files. - -- Gruss, Tobias - ------------------------------------------------------------ Tobias Hunger The box said: 'Windows 95 or better' [email protected] So I installed Linux. - ------------------------------------------------------------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9U6vrv0FZW3NyoqURAoDkAJ9CsG5AtpNPaFEbUZ6T+1t6zj74EACcD5qw 32bCq9eLj1NDaxJU2S3mNKQ= =8MdO -----END PGP SIGNATURE-----