[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Remind users about indentation conventions
From: |
Richard Stallman |
Subject: |
Remind users about indentation conventions |
Date: |
Sun, 04 Aug 2019 22:26:51 -0400 |
We should reaffirm the standard of putting the function name
in a definition in column zero to help parse programs.
------- Start of forwarded message -------
Subject: bug#36678: 27.0.50;
imenu not working in C++ (maybe because of namespace)
Resent-From: Alan Mackenzie <address@hidden>
Original-Sender: "Debbugs-submit" <address@hidden>
Resent-CC: address@hidden, address@hidden
Resent-Sender: address@hidden
To: Richard Stallman <address@hidden>
Date: Sun, 4 Aug 2019 08:51:06 +0000
Message-ID: <20190804085106.GA14630@ACM>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <address@hidden>
From: Alan Mackenzie <address@hidden>
Cc: address@hidden, address@hidden, address@hidden
Hello, Richard.
On Sat, Aug 03, 2019 at 22:56:19 -0400, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > CC Mode has had imenu type indexing right from its inception. What is
> > changing is the increasing complexity of function definitions, in
> > particular, the slow demise of the convention of function names being in
> > column zero.
> Why is that happening? Is there a practical benefit, or is it just
> a matter of fashion, or what?
In C++, it's largely the namespace, which is being used ever more.
Instead of writing
namespace foo {
int bar (int baz)
{
.....
}
.....
}
, people are indenting within the namespace, something like
namespace foo {
int bar (int baz)
{
....
}
....
}
. Not all the time, but a lot of the time, possibly most of the time.
This indentation inside a namespace seems like a natural way to format a
program, and people are going to carry on doing it.
The issue is how we best deal with this.
> --
> Dr Richard Stallman
> President, Free Software Foundation (https://gnu.org, https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)
- --
Alan Mackenzie (Nuremberg, Germany).
------- End of forwarded message -------
--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
- Remind users about indentation conventions,
Richard Stallman <=