folly/CODING_GUIDELINES.md
Folly is a collection of core libraries, which engineers depend on. Therefore, the primary requirements when writing Folly code are:
As an open-source library, there are a few necessary requirements:
folly. Prefix macros with FOLLY_, and C symbols with folly_.detail (e.g. folly::detail::XYZ)throw_exception from folly/lang/Exception.h instead of throwFolly only reimplements existing standard or boost libraries when there is good reason to. When improving upon an already-existing library:
Folly follows Meta's C++ Coding conventions. When changing a file that has non-standard style, consistency takes priority.
Some Folly files, based on standard classes, use naming conventions from the C++ standard:
snake_case instead of camelCase. If you are faced with this situation, use your judgement to
decide which casing to use.
Follow the Google developer documentation style guide. Highlights: