all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Source Code Formatting Standard Update
@ 2009-09-14 19:00 jyqvklioo
  2009-09-14 21:42 ` Stefan Monnier
  2009-09-16 11:56 ` jyqvklioo
  0 siblings, 2 replies; 13+ messages in thread
From: jyqvklioo @ 2009-09-14 19:00 UTC (permalink / raw)
  To: emacs-devel

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.




^ permalink raw reply	[flat|nested] 13+ messages in thread
* Source Code Formatting Standard Update
@ 2009-09-15  5:53 jyqvklioo
  0 siblings, 0 replies; 13+ messages in thread
From: jyqvklioo @ 2009-09-15  5:53 UTC (permalink / raw)
  To: emacs-devel

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.




^ permalink raw reply	[flat|nested] 13+ messages in thread
* Source Code Formatting Standard Update
@ 2009-09-15  7:31 jyqvklioo
  2009-09-15  7:39 ` Alfred M. Szmidt
  0 siblings, 1 reply; 13+ messages in thread
From: jyqvklioo @ 2009-09-15  7:31 UTC (permalink / raw)
  To: emacs-devel

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.




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-09-16 14:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-14 19:00 Source Code Formatting Standard Update 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
  -- strict thread matches above, loose matches on Subject: below --
2009-09-15  5:53 jyqvklioo
2009-09-15  7:31 jyqvklioo
2009-09-15  7:39 ` Alfred M. Szmidt
2009-09-15  8:03   ` David Kastrup

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.