Extracted from the new language "go":
http://golang.org/doc/effective_go.html
Formatting
Formatting issues are the most contentious but the least consequential.
People can adapt to different formatting styles but it's better if they
don't have to, and less time is devoted to the topic if everyone adheres
to the same style. The problem is how to approach this Utopia without a
long prescriptive style guide.
With Go we take an unusual approach and let the machine take care of
most formatting issues. A program, gofmt, reads a Go program and emits
the source in a standard style of indentation and vertical alignment,
retaining and if necessary reformatting comments. If you want to know
how to handle some new layout situation, run gofmt; if the answer
doesn't seem right, fix the program (or file a bug), don't work around it.
As an example, there's no need to spend time lining up the comments on
the fields of a structure. Gofmt will do that for you. Given the declaration
type T struct {
name string // name of the object
value int // its value
}
gofmt will line up the columns:
type T struct {
name string // name of the object
value int // its value
}
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev