Chapter 12. Rexx with Style

Overview

One of the primary advantages to Rexx is its ease of use. This leads to programs that are easier to read, enhance, and maintain. But as with any programming language, whether these benefits are truly attained depends on how scripts are written. Developers who design and build clear programs create work that has a longer life; those who develop cryptic or overly clever programs create scripts that will prove less useful after they change jobs. For this reason, we've offered recommendations throughout this book regarding Rexx best coding practices.

This chapter consolidates guidelines for writing clear, maintainable Rexx scripts. While some of the rules of thumb it offers might be considered personal preferences, there is value in attempting to list some of the techniques that lead to the most useful code having the greatest longevity. Figure 12-1 lists some of the techniques we'll discuss in this chapter.

Sometimes developers downplay readable style because it does not appeal to their desire to create "clever" programs. But good programming style is important even to the best developers. It directly affects the reliability of one's code and how many mistakes are made in developing and enhancing that code. This should convince even the advanced, hard-core developer of its value.

Readers are urged to consider how they might write Rexx in the most readable style possible. Whatever approach one adopts, consistency is a virtue. A program that passes variables ...

Get Rexx Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.