orthogonality programming in computer programming orthogonality means that operations change just one thing without affecting others the term is mostfrequently used regarding assembly instruction sets as orthogonal instruction set 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 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 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 memorycell 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 vaxs 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 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 though this concept was first applied to programming language orthogonality has since become recognized as a valuable feature in the design of apis and even user interfaces there too having a small set of composable primitive operations without surprising crosslinkages is valuable leading to systems that are easier to explain and less frustrating to use the pragmatic programmer from journeyman to master by andrew hunt and david thomas addisonwesley 2000 isbn9780201616224 the art of unix programming chapter about orthogonality orthogonality concept wellexplained vtesoftware engineeringfields computer programming requirements engineering software deployment software design software maintenance software testing systems analysis formal methods concepts data modeling enterprise architecture functional specification modeling language orthogonality programming paradigm software software archaeology software architecture software configuration management software development methodology software development process software quality software quality assurance software verification and validation structured analysis orientations agile aspectoriented object orientation ontology service orientation sdlc modelsdevelopmental agile eup executable uml incremental model iterative model prototype model rad up scrum spiral model vmodel waterfall model xp other spice cmmi data model er model function model information model metamodeling object model systems model view model languages idef uml usl sysml softwareengineers victor basili kent beck grady booch fred brooks barry boehm peter chen danese cooper ward cunningham tom demarco edsger w dijkstra delores m etter martin fowler adele goldstine margaret hamilton c a r hoare lois haibt mary jean harrold grace hopper watts humphrey michael a jackson ivar jacobson alan kay nancy leveson stephen j mellor bertrand meyer david parnas trygve reenskaug winston w royce james rumbaugh mary shaw peri tarr elaine weyuker niklaus wirth edward yourdon related fields computer science computer engineering project management risk management systems engineering category commons 