This page is intended to serve as guidance on how things are supposed to look and how things are intended to be organized. The purpose of creating and specifying a style is not to satisfy the unrighteous lusts of the project lead; rather, it is to improve consistency and readability. Most of the decisions given here were made after much discussion and experimentation and were chosen to enhance the quality of the code.

Please read the following pages for further information about the style chosen for NJOY and its subprojects:

A good and short read about the importance of following a chosen style is: Brown M&Ms: A Quick Way to Determine Code Quality.

Language Standards and Tools

In order to build NJOY from source, support for the following language standards is required:

These language standards were chosen as they are the current standards with widespread compiler support at the time they were chosen.

Any feature of these language standards is fair game to be assumed available while developing. In addition, to build and compile NJOY, the following build/configuration tools are required:

Packages and Code Dependencies

All code that is used by NJOY or any of its packages must be freely available and compatible with the NJOY LICENSE. That way we don’t run afoul of the law.

Since we want the build process for NJOY to be as simple as possible for the user, all packages and code dependencies must be distributed and built as part of NJOY.

For example, Catch is used in nearly all of the NJOY21 packages, but the build process does not require the user to download and install Catch separately. Instead, Catch is distributed with NJOY21 through our own catch-adapter.

Compiling and Compiler Flags

All source should compile without throwing any errors (clearly) or warnings. If warnings are observed, the source should be corrected to avoid the warnings. If it is not possible to resolve the cause of the compiler warnings, then compiler flags may be added to suppress the warning, but this should be a last resort—we want to have standard-compliant code.

NJOY projects use metaconfigure to manage the dependencies and the configure, build, and test steps. metaconfigure will ensure that the appropriate compiler flags are used across all the projects.