orthogonal : Java Glossary

orthogonal
Literally, at right angles, hence independent or irrelevant to. The term is commonly used in describing computer instruction sets. With an orgothogonal instruction set, such as the Motorola 68000, you can use any register for any purpose. With a non-orthogonal set such as the Intel Pentium, each register has special properties, e. g. only CX can be used for counting string loops. BX can be used as an index register, but AX cannot. Only DX:AX can hold a dividend. Orthogonal instuction sets result in bulkier hand-generated assembler code, but are easier for compilers to generate optimally fast, compact code. More generally, in programming languages, orthogonality means design so that changes in one thing don’t effect another. The example they give a user interface and database — you should be able to swap the database without changing the interface or make changes to the interface without affecting the database.

Here are some examples of non-orthogonality in C:

  1. C has two kinds of built-in data structures, arrays and records (structs). Records can be returned from functions, but arrays cannot.
  2. A member of a struct can have any type except void or a structure of the same type.
  3. An array element can be any data type except void or a function.
  4. Parameters are passed by value, unless they are arrays, in which case they are passed by reference.
  5. a+b usually means that they are added, unless a is a pointer the value of b may be changed before the addition takes place.
Non-orthogonality means exceptions to the general language rules, which make it harder to learn. It means that you cannot combine language features in all possible ways. Excessive orthogonality makes it possible to say silly things in the language that complicate the compilers.

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/orthogonal.html J:\mindprod\jgloss\orthogonal.html
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, please quote it and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. Threatening to kill me or spouting obscenities has yet to persuade me to change my mind.
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.179.211]
You are visitor number 14,219.