PATCH for java.nio FileChannel and MappedByteBuffer
Boehm, Hans
hans.boehm@hp.com
Thu Feb 26 18:25:00 GMT 2004
Isn't this argument backwards?
As far as I'm concerned, unindented "ifdef"s are just as bad as unindented "if"s.
I can't think of any reason to indent one and not the other. (There is an issue
with #ifdefs that don't nest correctly inside other program structure, and are
thus unavoidably hard to read. But I don't think that was the topic here.)
If emacs doesn't indent "ifdef"s, it needs to be fixed.
I don't use emacs, so I don't know. But I'm also not a great believer in fully automatic
indentation:
do_something;
/* informal assertion */
do_something_else;
and_something_else;
looks to a formatter just like
do_something;
/* Informal description of big task */
step1_of_big_task;
step2_of_big_task;
Hans
> -----Original Message-----
> From: java-owner@gcc.gnu.org
> [mailto:java-owner@gcc.gnu.org]On Behalf Of
> Andrew Haley
> Sent: Thursday, February 26, 2004 2:24 AM
> To: Ranjit Mathew
> Cc: java@gcc.gnu.org
> Subject: Re: PATCH for java.nio FileChannel and MappedByteBuffer
>
>
> Ranjit Mathew writes:
> > though it does not seem to be mandated (or frowned
> > upon) by the GNU coding standards document, stuff
> > within #ifdef conditionals looks much better (IMHO)
> > when it's indented like stuff within "regular" if
> > statements like so:
> >
> > #ifdef FOO
> > #include <snafu.h>
> > #endif /* FOO */
> >
> > or perhaps like so for some older pre-processors:
> >
> > #ifdef FOO
> > # include <snafu.h>
> > #endif /* FOO */
>
> The question is "does EMACS do this?" I am human and therefore
> fallible, and I know that if I do indentation by hand I'll screw it up
> and waste a lot of time trying to get it right. So I don't do
> indentation by hand, ever. As far as I am aware thr GNU coding
> standards do not mandate anythying that EMACS doesn't do.
>
> Andrew.
>
More information about the Java
mailing list