rexx-style-guide

Style guide for Rexx, ooRexx, NetRexx, and CREXX

This style guide is maintained by Matt Ferlita with input from the RexxLA community. It is viewable and printable at https://mferlita.github.io/rexx-style-guide/

This guide does not in any way prescribe a singular “correct” way to write Rexx. Rather, it gives suggestions on best practices to create readable and consistent code to facilitate better collaboration among developers. After all, communicating with your fellow programmers is just as important as communicating with the computer.

“Enhancing readability enhances our ability to solve problems” — V. Anton Spraul, Think Like a Programmer

General

Naming

Element Format
Keyword Instructions lowercase
Built-in Functions UPPERCASE
Directives lowercase
Methods camelCase
Variables camelCase
Classes and Routines PascalCase
Boolean lowercase

Layout and Whitespace

Comments

Structure

Operators and Assignments

Control Flow

DO/LOOP statements

Block Formatting

String Concatenation

String Literals

PARSE

Error Handling

ADDRESS

Guidelines Specific to Classic Rexx

Guidelines Specific to ooRexx

Guidelines Specific to NetRexx

Guidelines Specific to CREXX

Guidelines for Portability

Tools

How to Contribute

This guide is a work in progress. Some guidelines don’t have examples to illustrate them, others haven’t been fleshed out, and still others have not been considered yet. As such, nothing is set in stone. If you’d like to contribute, feel free to open issues or send pull requests with improvements. See contributing.md for details.

Sources of Inspiration

License

This guide is licensed under CC BY 4.0

Spread the word!

A style guide isn’t really any use if no one uses it. If you like the guide, tell your friends, your colleagues, and share it on social media!