C Language

The Evolution of Standards

Standards shouldn't be frozen in time. A "standard" that changes weekly isn't much use, but over time good standards evolve as you discover more effective approaches. Some newly discovered approaches may be improvements in lexical style, but the main improvements will be in the reuse of macro, function, and class libraries. As these libraries grow and improve, old methods may be replaced by better ones and the standards should be modified to reflect the changes.

Evolution of the standards is easier than evolution of existing code. This is the place for good editors and translation tools. Most programming editors today provide both a search-and-replace feature that supports advanced "regular expression" pattern matching, as well as an "extension" (or "macro") language for writing editing functions or scripts. Together these facilities allow you to make file-wide revisions more easily. For quick standalone translations, a language like Awk is an easy-to-use, powerful tool. Awk provides regular expression pattern matching, dynamic table handling and simplified I/O, and it uses a syntax similar to C, so it's an ideal "workbench" tool for C programming.

Changing code to satisfy evolving standards is only one reason to use the best programming editor you can find for C programming. Among the capabilities you can expect from a good editor: multiple files and windows, mouse-driven text selection and file positioning, auto-indenting of C source code, block indent and unindent, finding matching delimiters, one- and two-keystroke "skeleton" code expansion, compiler execution from within the editor, pop-up display of compiler errors, and point-and-shoot navigation to the source of errors.

With a good editor, it's so easy to manipulate text that it's not a burden to pay careful attention to programming standards, especially ones that deal with lexical style. By contrast, "dumb terminal" and line-oriented editors, or editors without mouse and window support or an extension language, are poor choices to encourage programmers to "polish" code.

by BrainBellupdated
Advertisement: