digplanet beta 1: Athena
Share digplanet:

Agriculture

Applied sciences

Arts

Belief

Chronology

Culture

Education

Environment

Geography

Health

History

Humanities

Language

Law

Life

Mathematics

Nature

People

Politics

Science

Society

Technology

In computer programming, 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. The term is most-frequently used regarding assembly instruction sets, as orthogonal instruction set.

## Concept

Orthogonality is an important concept, addressing how a relatively small number of components can be combined in a relatively small number of ways to get the desired results. It is associated with simplicity; the more orthogonal the design, the fewer exceptions. This makes it easier to learn, read and write programs in a programming language.[1] 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).

An example from IBM Mainframe and VAX highlights this concept. An IBM mainframe has two different instructions for adding the contents of a register to a memory cell (or another register). 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. In the second case, the contents of Reg1 are added to the contents of another register (Reg2) and the result is stored in Reg1.

In contrast to the above set of statements, VAX has only one statement for addition:

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.

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) than the one provided by IBM.

The design of C language may be examined from the perspective of orthogonality. 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. Examples of exceptions follow:

• Structures (but not arrays) may be returned from a function.
• An array can be returned if it is inside a structure.
• A member of a structure can be any data type (except void), or the structure of the same type.
• An array element can be any data type (except void).
• Everything is passed by value (except arrays).
• Void can be used as a type in a structure, but a variable of this type cannot be declared in a function.

• The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt and David Thomas. Addison-Wesley. 2000. ISBN 978-0-201-61622-4.
 242 videos foundNext >
 Programming Language Evaluation - Fortran Vs AlgolProgramming Languages & Design Concepts is the basic programming structure identifier for programmers. Through this DVD we are planning to compare ... Orthogonal complements | Alternate coordinate systems (bases) | Linear Algebra | Khan AcademyOrthogonal Complements as subspaces. Watch the next lesson: ... 7 6 The Inner Product Orthogonalityvideo learn linear algebra video meschach video linear programming video matrix video integer programming interger programming linear assignment algebra ... Orthogonal matrices preserve angles and lengths | Linear Algebra | Khan AcademyShowing that orthogonal matrices preserve angles and lengths Watch the next lesson: ... Introduction to orthonormal bases | Linear Algebra | Khan AcademyLooking at sets and bases that are orthonormal -- or where all the vectors have length 1 and are orthogonal to each other. Watch the next lesson: ... Orthogonal Collocation Example ProblemDiscretization of a continuous time representation allow large-scale nonlinear programming (NLP) solvers to find solutions at specified intervals in a time horizon ... Orthogonal complement of the nullspace | Linear Algebra | Khan AcademyThe orthogonal complement of the nullspace and left nullspace. Watch the next lesson: ... Finding projection onto subspace with orthonormal basis example | Linear Algebra | Khan AcademyExample of finding the transformation matrix for the projection onto a subspace with an orthonormal basis Watch the next lesson: ... The Gram-Schmidt process | Alternate coordinate systems (bases) | Linear Algebra | Khan AcademyFinding an orthonormal basis for a subspace using the Gram-Schmidt Process Watch the next lesson: ... Vector dot product and vector length | Vectors and spaces | Linear Algebra | Khan AcademyDefinitions of the vector dot product and vector length Watch the next lesson: ...
 242 videos foundNext >

We're sorry, but there's no news about "Orthogonality (programming)" right now.

 Limit to books that you can completely read online Include partial books (book previews) .gsc-branding { display:block; }

Oops, we seem to be having trouble contacting Twitter