Language Evaluation Criteria: Orthogonality & Control
Welcome to the authoritative educational study guide for CS508 Modern Programming Languages Lecture 3. This lecture continues the rigorous exploration of language evaluation criteria, focusing on two pivotal characteristics that govern readability and architectural clarity: orthogonality and control statements. In computer science and programming language design, orthogonality refers to the property whereby a relatively small set of primitive constructs can be combined in a relatively small number of ways, and every possible combination of primitives is legal and meaningful without arbitrary exceptions. The term originates from mathematics, where orthogonal vectors are completely independent and perpendicular. In an orthogonal programming language, the meaning of a language construct is consistent regardless of the syntactic context in which it appears. To understand this concept, the lecture examines prominent non-orthogonalities in the C programming language. In C, structures can be returned as values from functions, but arrays cannot; arrays can be passed as function arguments, but they automatically decay into pointers; an array element can be of virtually any data type except void or a function; and all function parameters are passed by value except arrays, which are effectively passed by reference. These arbitrary exceptions force programmers to memorize extensive lists of special cases, increasing cognitive load and error frequency. In contrast, languages with high orthogonality, such as ALGOL 68, allow virtually all primitives to combine freely. However, the curriculum notes that extreme orthogonality can occasionally introduce subtle complexities if combinations produce unexpected runtime behaviors. The lecture also analyzes the essential role of control statements and data types in readability. The historical shift from unrestricted branching using goto statements to structured programming constructs—such as if-then-else selection, while loops, for iterations, and switch blocks—revolutionized software engineering by eliminating chaotic spaghetti code. Furthermore, adequate facilities for user-defined data structures, records, and explicit boolean types drastically improve code transparency. For Virtual University students, understanding orthogonality and structured control is vital for midterm exams. Solve cs508 past papers by Moaaz and Waqar Siddhu, practice cs508 solved mcqs, and study course handouts on VUSIGMA to achieve outstanding results.
No questions available yet.
There are currently no examination questions published for Language Evaluation Criteria: Orthogonality & Control. Explore other curriculum units or build a custom quiz with the practice builder.