Re: [dev] [sbase] style

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Tue, 18 Nov 2014 10:28:21 +0000

On Tue, Nov 18, 2014 at 02:04:30AM +0100, koneu wrote:
> Hi,
>
> FRIGN wrote:
> > If headers depend on order, the headers are broken. Dismissed.
>
> Most headers I write are plan9 style[0] headers. "The files are not
> protected against multiple inclusion and themselves contain no nested
> #includes. Instead the programmer is expected to sort out the
> requirements and to #include the necessary files once at the top of each
> source file." It is actually really elegant for small scale projects
> (unless you write C++ and have to manually include 30 layers of
> templates ofcourse).

Yes I second this. Our local headers do not use preprocessor guards
and we are expected to include them in the appropriate order. This is
the sane thing to do here.

The libc does make the guarantee that the headers will work in any
include order so they can be sorted lexicographically.
Received on Tue Nov 18 2014 - 11:28:21 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 18 2014 - 11:36:08 CET