Professional Documents
Culture Documents
One of the most important criteria for judging a programming language is the ease with which programs can be read and understood. Before 1970, software development was largely thought of in terms of writing code. The primary positive characteristics of programming languages were efficiency and machine readability.
Readability-I
Language Constructs were designed more from the point of view of the computer than of computer users. In 1970s, the software lifecycle concept was developed; Coding has much smaller role and maintenance was recognized as the major part of the cycle, especially in terms of cost. Ease of maintenance is determined in large part by the readability of programs. Readability became an important measure of the quality of programs and programming languages.
(b) Orthogonality
The meaning of an orthogonal language feature is independent of the context of its appearance in a program. Orthogonality follows from a symmetry of relationships among primitives. Pointer should be able to point to any type of variable or data structure. The lack of orthogonality lead to exceptions to the rules of the language. For example if pointers were not allowed to point to arrays, many of those possibilities would be eliminated.
(b) Orthogonality-I
Lack of orthogonality in a high level language, consider the following rules and exceptions in C. Records can be returned from function but arrays cannot. A member of structure can have any data type except void. Parameters pass by value but arrays pass by reference.
(b) Orthogonality-II
Too much orthogonality can also cause the problems. ALGOL 68 is too much orthogonal.
Writability
Writability is a measure of how easily a programming language can be used to create program for a chosen problem domain. Most of the language characteristics that affect readability also affect writability. This follows directly from the fact that the process of writing a program requires the programmer frequently to reread the part of the program that is already written.
Writability-I
Readability and writability must be considered in the context of the target problem domain of a language. It is simply not reasonable to compare the writability of two languages. For example the writabilities of COBOL and Fortran are dramatically different for creating a program to deal with two dimensional arrays for which Fortran is ideal. Their writabilities are also quite different for producing financial reports with complex formats, for which COBOL was designed.
(c) Expressivity
Expressivity in a language can refer to several different characteristics. APL is very powerful for writing mathematical expressions. In C the notation count++ is more expressive than count = count + 1 In Java for loop is easier than while. All increase the writability of a language.
Reliability
A program is said to be reliable if it performs to its specifications under all conditions. The following language features have significant effect on the reliability of program: (a)Type Checking (b)Exception Handling (c)Aliasing (d)Readability and Writability
(c) Aliasing
Loosely defined aliasing is having two or more distinct names that can be used to access the same memory cell. It is now widely accepted that aliasing is a dangerous feature in a programming language. Most programming languages allow some kind of aliasing e.g. two pointers set to point to the same variable. In such a program the programmer must always remember that changing the value pointed to by one of the two changes the value referenced by the other. In some languages aliasing is used to overcome deficiencies in the languages data abstraction facilities. Other languages greatly restrict aliasing to increase their reliability.
Cost
The ultimate total cost of a programming language is a function of many of its characteristics. First, there is the cost of training programmers to use the language (depends upon simplicity and orthogonality of programming language). Second is the cost of writing programs in the language. Both the above two cost can be significantly reduce with good programming environment. Third is the cost of compiling programs in the language. For example high cost of running first generation Ada compilers. Fourth the cost of executing programs written in a language is greatly influenced by that language design. A language that require many runtime type checks will prevent fast code execution regardless of the quality of the compiler.Execution efficiency foremost concern in the design of early languages.
Fifth factor is the cost of the language implementation system. Java is an open source language. Python is an open source language. Sixth is the cost of poor reliability. If software fails in a critical or even the non-critical systems the cost could be very high. The final consideration is the cost of maintenance. Maintenance depends upon number of language characteristics. The primary characteristic is readability.
Conclusion
Language design criteria are weighed differently from different point of view. Language implementers are concerned primarily with the difficulty of implementing the constructs and features of the language. Language users are worried about writability first and readability later. Language designer the ability to reuse. These characteristics sometimes conflict with one another.