unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: jyqvklioo@googlemail.com
To: emacs-devel@gnu.org
Subject: Source Code Formatting Standard Update
Date: Tue, 15 Sep 2009 07:53:50 +0200	[thread overview]
Message-ID: <200909150753.51576.jyqvklioo@googlemail.com> (raw)

I quote:
"
http://www.gnu.org/prep/standards/html_node/Formatting.html
5.1 Formatting Your Source Code
It is important to put the open-brace that starts the body of a 
C function in column one, so that they will start a defun.
"
Does emacs still have this limitation?
If not,
the standard can be updated to make the curly brace placement more consistent.


The next issue is not emacs specific, 
but here may be as good a place to address it as there is, as far as I can see.
"
In Standard C, if the arguments don't fit nicely on one line, split it like this:
     int
     lots_of_args (int an_integer, long a_long, short a_short,
                   double a_double, float a_float)
"
This practice produces poor results in languages with highly nested namespaces,
like object oriented languages. There you can get code like:

namespace.ClassName.NestedClass.nicelyDescriptiveClassName.staticMethod(namespace.ParameterObject
                                                                        a,
                                                                        otherNamespace.secondObject
                                                                        b);

If you line break at periods also, the names would span multiple lines.




             reply	other threads:[~2009-09-15  5:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15  5:53 jyqvklioo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-15  7:31 Source Code Formatting Standard Update jyqvklioo
2009-09-15  7:39 ` Alfred M. Szmidt
2009-09-15  8:03   ` David Kastrup
2009-09-14 19:00 jyqvklioo
2009-09-14 21:42 ` Stefan Monnier
2009-09-15 15:12   ` Richard Stallman
2009-09-16 11:56 ` jyqvklioo
2009-09-16 12:13   ` Alfred M. Szmidt
2009-09-16 13:33     ` jyqvklioo
2009-09-16 13:52       ` Alfred M. Szmidt
2009-09-16 14:08       ` Miles Bader
2009-09-16 13:57   ` Stephen J. Turnbull

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909150753.51576.jyqvklioo@googlemail.com \
    --to=jyqvklioo@googlemail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).