emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Source Code Formatting Standard Update


From: jyqvklioo
Subject: Source Code Formatting Standard Update
Date: Tue, 15 Sep 2009 07:53:50 +0200
User-agent: KMail/1.11.4 (Linux/2.6.30-1-686; KDE/4.2.4; i686; ; )

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 via email to

[Prev in Thread] Current Thread [Next in Thread]