digplanet beta 1: Athena
Share digplanet:

Agriculture

Applied sciences

Arts

Belief

Business

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[edit]

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:

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.

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.

Further reading[edit]

  • The Pragmatic Programmer: From Journeyman to Master by Andrew Hunt and David Thomas. Addison-Wesley. 2000. ISBN 978-0-201-61622-4.

External links[edit]

References[edit]

  1. ^ Sebesta, Robert (2012). Concepts of Programming Languages 10th Ed. Pearson Higher Ed. pp. 9–12, 73. ISBN 9780131395312. 

Original courtesy of Wikipedia: http://en.wikipedia.org/wiki/Orthogonality_(programming) — Please support Wikipedia.
This page uses Creative Commons Licensed content from Wikipedia. A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia.
156 videos foundNext > 

Programming Language Evaluation - Fortran Vs Algol

Programming Languages & Design Concepts is the basic programming structure identifier for programmers. Through this DVD we are planning to compare language e...

Lecture 2: Orthogonality

Orthogonality of vectors and matrices; decomposing vectors into orthogonal components.

Lecture 18: Equality Constrained Quadratic Programming

In Lecture 18 we take our first look at QP where we try and minimise a quadratic objective function. We consider unconstrained and equality constrained quadr...

Week 10 - Symmetric matrices and orthogonal diagonalization

Fisher-Yates Shuffle Modern Algorithm JavaScript Programming Tutorial

Lesson Code: http://www.developphp.com/view.php?tid=1356 In this programming exercise we will demonstrate the concepts behind the Fisher-Yates Modern Shuffle...

Lecture 14: Orthogonal Vectors and Subspaces

This is a basic subject on matrix theory and linear algebra. Emphasis is given to topics that will be useful in other disciplines, including systems of equat...

Benoit Valiron: "Orthogonality and Algebraic Lambda-Calculus"

Speaker: Benoit Valiron (University Joseph Fourier, Grenoble) Title: Orthogonality and Algebraic Lambda-Calculus Event: Quantum Physics and Logic 2010 (May 2...

Lecture 16b-17 Conic programming 2

Lecture course 236330, Introduction to Optimization, by Michael Zibulevsky, Technion Continue with Chebyshev approximation, which starts at 1:16:14 of the pr...

Jerzy K. Baksalary: "Adjusted orthogonality properties in multi-way block designs"

International Workshop on Linear Models, Experimental Designs, and Related Matrix Theory, University of Tampere, Finland, 6-8 August, 1990. Jerzy K. Baksalar...

1-Stiffness Programming " Mahmoud Al Sakkar "

156 videos foundNext > 

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

Loading

Oops, we seem to be having trouble contacting Twitter

Support Wikipedia

A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia. Please add your support for Wikipedia!

Searchlight Group

Digplanet also receives support from Searchlight Group. Visit Searchlight