JavaScript:SpiderMonkey:C++ Coding Style: Difference between revisions

Jump to navigation Jump to search
Assimilate some information from the other wiki.
(Assimilate some information from the other wiki.)
Line 6: Line 6:


C++ is powerful, with many degrees of freedom and some attractive nuisances. We should aspire to use it in a lean, close-to-the-metal fashion, and avoid style-over-substance [http://www.bikeshed.com/ bikeshedding].
C++ is powerful, with many degrees of freedom and some attractive nuisances. We should aspire to use it in a lean, close-to-the-metal fashion, and avoid style-over-substance [http://www.bikeshed.com/ bikeshedding].
== Whitespace ==
Indent four spaces.
Tabs are taken to be eight spaces, and an Emacs magic comment at the top of each file tries to help. If you're using MSVC or similar, you'll want to set tab width to 8, and help convert these files to be space-filled. Do not add hard tabs to source files; do remove them whenever possible.
* Code should fit within 99 columns
* Comments should fit within 80 columns
Both figures include indentation. Break down lines that are too long.
In comments, use one space, not two, between sentences and after a colon.
If an expression is too long to fit on a line, split it after a binary operator.


== Includes ==
== Includes ==
29

edits

Navigation menu