Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "Orthogonality"?

What does "orthogonality" mean when talking about programming languages?

What are some examples of Orthogonality?

like image 545
ahmet alp balkan Avatar asked Oct 04 '22 13:10

ahmet alp balkan


People also ask

What is meant by orthogonality?

1a : intersecting or lying at right angles In orthogonal cutting, the cutting edge is perpendicular to the direction of tool travel. b : having perpendicular slopes or tangents at the point of intersection orthogonal curves.

What orthogonality tells us?

It means they [the random variables X,Y] are 'independent' to each other. Independent random variables are often considered to be at 'right angles' to each other, where by 'right angles' is meant that the inner product of the two is 0 (an equivalent condition from linear algebra).

What is orthogonality in linear algebra?

In mathematics, orthogonality is the generalization of the notion of perpendicularity to the linear algebra of bilinear forms. Two elements u and v of a vector space with bilinear form B are orthogonal when B(u, v) = 0. Depending on the bilinear form, the vector space may contain nonzero self-orthogonal vectors.

What is orthogonality in a programming language?

Orthogonal, in a computing context, describes a situation where a programming language or data object can be used without considering its after-effects toward other program functions. In vector geometry, orthogonal indicates two vectors that are perpendicular to each other.


2 Answers

Orthogonality is the property that means "Changing A does not change B". An example of an orthogonal system would be a radio, where changing the station does not change the volume and vice-versa.

A non-orthogonal system would be like a helicopter where changing the speed can change the direction.

In programming languages this means that when you execute an instruction, nothing but that instruction happens (very important for debugging).

There is also a specific meaning when referring to instruction sets.

like image 298
C. Ross Avatar answered Oct 07 '22 03:10

C. Ross


From Eric S. Raymond's "Art of UNIX programming"

Orthogonality is one of the most important properties that can help make even complex designs compact. In a purely orthogonal design, operations do not have side effects; each action (whether it's an API call, a macro invocation, or a language operation) changes just one thing without affecting others. There is one and only one way to change each property of whatever system you are controlling.

like image 43
Federico klez Culloca Avatar answered Oct 07 '22 03:10

Federico klez Culloca