Orthogonality (programming)
In computer programming, orthogonality means that operations change just one thing without affecting others.[src] The term is most-frequently used regarding assembly instruction sets, as orthogonal instruction set.[src] Orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language.[src] It is associated with simplicity; the more orthogonal the design, the fewer exceptions.[src] This makes it easier to learn, read and write programs in a programming language.[src] The meaning of an orthogonal feature is independent of context; the key parameters are symmetry and consistency (for example, a pointer is an orthogonal concept).[src] An example from IBM Mainframe and VAX highlights this concept.[src] An IBM mainframe has two different instructions for adding the contents of a register to a memory cell (or another register).[src] These statements are shown below: A Reg1, memory_cell AR Reg1, Reg2 In the first case, the contents of Reg1 are added to the contents of a memory cell; the result is stored in Reg1 .[src] In the second case, the contents of Reg1 are added to the contents of another register ( Reg2 ) and the result is stored in Reg1 .…[src]
In computer programming, orthogonality means that operations change just one thing without affecting others.[src] The term is most-frequently used regarding assembly instruction sets, as orthogonal instruction set.[src] Orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language.[src] It is associated with simplicity; the more orthogonal the design, the fewer exceptions.[src] This makes it easier to learn, read and write programs in a programming language.[src] The meaning of an orthogonal feature is independent of context; the key parameters are symmetry and consistency (for example, a pointer is an orthogonal concept).[src] An example from IBM Mainframe and VAX highlights this concept.[src] An IBM mainframe has two different instructions for adding the contents of a register to a memory cell (or another register).[src] These statements are shown below: A Reg1, memory_cell AR Reg1, Reg2 In the first case, the contents of Reg1 are added to the contents of a memory cell; the result is stored in Reg1 .[src] In the second case, the contents of Reg1 are added to the contents of another register ( Reg2 ) and the result is stored in Reg1 .[src] In contrast to the above set of statements, VAX has only one statement for addition: ADDL operand1, operand2 In this case the two operands ( operand1 and operand2 ) can be registers, memory cells, or a combination of both; the instruction adds the contents of operand1 to the contents of operand2 , storing the result in operand1 .[src] VAX's instruction for addition is more orthogonal than the instructions provided by IBM; hence, it is easier for the programmer to remember (and use) the one provided by VAX.[src] The Revised Report on the Algorithmic Language Algol 68 had this to say about "Orthogonal design": The design of C language may be examined from the perspective of orthogonality.[src] The C language is somewhat inconsistent in its treatment of concepts and language structure, making it difficult for the user to learn (and use) the language.[src] Examples of exceptions follow: Structures (but not arrays) may be returned from a function.[src] An array can be returned if it is inside a structure.[src] A member of a structure can be any data type (except void, or the structure of the same type).[src] An array element can be any data type (except void).[src] Everything is passed by value (except arrays).[src] Though this concept was first applied to programming languages, orthogonality has since become recognized as a valuable feature in the design of APIs and even user interfaces.[src] There, too, having a small set of composable primitive operations without surprising cross-linkages is valuable, as it leads to systems that are easier to explain and less frustrating to use.[src] On the other hand, orthogonality does not necessarily result in simpler systems, as the example of IBM and VAX instructions shows — in the end, the less orthogonal RISC CPU architectures were more successful than the CISC architectures.[src] ==See also== Coupling (computer programming) Cohesion (computer science) ==References== ==Further reading== The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt and David Thomas.[src] Addison-Wesley.[src] 2000.[src] .[src] A.[src] van Wijngaarden, Orthogonal Design and Description of a Formal Language, Mathematisch Centrum, Amsterdam, MR 76, October 1965.[src] ==External links== "The Art of Unix Programming", chapter about Orthogonality – Orthogonality concept well-explained[src]
39 sentences · 39 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Orthogonality (programming)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/orthogonality-programming. Accessed 29 November 2026.
Chicago
"Orthogonality (programming)." encyclopegia.org. Accessed November 29, 2026. https://encyclopegia.org/wiki/orthogonality-programming.
APA
encyclopegia.org. (2025). Orthogonality (programming). Retrieved November 29, 2026, from https://encyclopegia.org/wiki/orthogonality-programming
Accessed November 29, 2026 · CC BY-SA 4.0 · citation page · JSON