Indigresso Wiki

Open Source Stuff for DASH7

User Tools

Site Tools


opentag:coding_guidelines

Official OpenTag Coding Guidelines

Contributions to the official OpenTag codebase must meet the official coding guidelines. Subordinate to the official coding guidelines are the Official Style Guidelines and the Official Performance Guidelines.

Executive Summary
Write code that is fast and compact. Speed and compactness trump ease-of-use, but always strive to write modular, easy-to-read code. Never use C++ or other languages designed for object-oriented syntax. Never make important data types “static” or otherwise private. Compulsive OO is the way of the devil, and it will not be tolerated in official codebases.

Base Official Coding Guidelines

Official codebases are blessed by JP – that is the overriding requirement. This said, code that does not meet the guidelines is very unlikely to be blessed. Official codebases will be hosted in the main source distribution (sourceforge). Unofficial codebases may be interoperable with official codebases, and they may be made available to the community, just not on sourceforge alongside the official codebases.

Usage of C Language

C99 is the preferred coding language for OpenTag. Compiler-specific language options (like pragmas) are OK as long as they are dealt with in the preprocessor such that other supported compilers can work.

Usage of Assembly Language

Assembly language is permitted inside platform code or custom application code. Platform code is inside the /OTPlatform/ directory and application code is inside the /Apps/[app-name]/ directory. Assembly code is not permitted inside the OpenTag library (/OTlib/ directory).

Usage of compiled languages

For compiled languages, only C is permitted. Languages that resolve to C after the compiler (like ObjC and Ada) might be given special dispensation at a later time. However, C++ will never be permitted in the OpenTag official codebase because JP agrees with Linus.

Usage of other interpreted languages

OpenTag will support a brand of Forth called DASHForth (pun intended), that is being developed. It is not available at the current time (Oct 2011), and it probably will not be integrated into the codebase until version 1.1 or 1.2. DASHForth is designed mostly for application-layer programming at the client-level, but could be used for other types of programming, too.

opentag/coding_guidelines.txt · Last modified: 2012/03/09 04:38 by jpnorair