Welcome back to the second post of Language Evaluation Criteria. If you missed the first article or didn’t have enough time to read it, here’s the link. It’s just going to take 10 minutes of your life. Should we start?
Another important criterion for a programming language is how convenient the language is to create programs for the selected problem, which is called… yes you guessed right, writability. We said that it is controversial to compare the experiences of two different programmers in readability topics, so it is not correct to compare programs created for two different purposes in writability either, as one might be designed to make programs for that particular application and the other might not.
Characteristics that affect readability might also affect writability, such as Simplicity and Orthogonality. Those two terms have been explicitly explained in the same first post I mentioned above. Having too many constructs in the programming language might complicate as one might use the unknown features accidentally and might not realize the feature of it. Also, we mentioned that a lack of orthogonality reduces readability yet too much orthogonality is also a threat to writability.
Expressivity — How easy the code is written and how easily understood by people and the compiler. So if a language has more complicated ways of specifying computations, it reduces expressivity. In C, it is convenient and easy for both compiler and human-beings to understand count++ rather than count = count + 1;
Reliability is as important as readability and writability. A system is reliable if the number of errors is few and it behaves as expected. There are some concepts that affect reliability, which is Type Checking, Exception Handling, and Aliasing. Just as readability characteristics affect writing ability, readability and writing performance characteristics affect reliability.
Type-Checking — Testing for type errors either by the compiler or during program execution. Note that compile-time type checking is more desirable than run-time type checking as it’s less costly. Not every programming language is designed for type checking, Java checks the types of nearly all variables and expressions at compile time, however, this is not the case for C programming language.
Exception Handling — It is used to cease run-time errors and in those exceptional times, it helps to suggest new solutions by the programmers. Different programming languages, as well as C++ (not C), Java, and C# use this exception handling feature.
Aliasing — It refers to the situation where the same memory cell can be accessed by two or more distinct names in a program. Programing languages, such as C++, allow aliasing by pointers (referencing) to the same variable. Don’t forget that if pointers point to the same variable, changing the value of one will change the value referenced by the others.
I hope, you enjoyed it! Stay tuned for more articles. Feel free to ask questions. Peace ✌🏼
- Sebesta, R. W. (2019). Examples of Multiple Selectors. In Concepts of programming languages (pp. 40–49). NY, NY: Pearson.