Karteikarten
Language Evaluation Criteria
Karten in diesem Stapel (14)
- 1Why study programming languages?1. Increased capacity to express ideas
2. Increase tools in toolbox -- increased knowledge of choosing the appropriate language
3. Increased ability to learn new languages - 2ReadabilityThe ease with which programs can be read and understood.
Depends on four factors:
1. Simplicity
2. Orthogonality
3. Data types
4. Syntax Design - 3SimplicityThe more basic constructs a language has, the more difficult it is to learn.
Feature multiplicity: having more than one way to accomplish a particular operation. (Can increase confusion)
Operator overloading: when a single operator symbol has more than one meaning. (Reduces readability if users can create their own overloading)
Oversimplifying: causes of lack of control statements, harder to read (i.e. assembly language). - 4OrthogonalityA relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of a language.
If changing "A" does not change "B".
The more orthogonal the language is, the fewer exceptions the language rules require, and a higher degree of regularity makes the language easier to understand.
Too much orthogonality: creates unnecessary complexities -- a large number of primitives results in a large number of possible combinations. - 5Data TypesThe presence of adequate facilities for defining data types and structures aids readability.
i.e. boolean flag = true, is easier to understand than flag = 1. - 6Syntax DesignSpecial words: the fewer reserved words, the greater the readability. Use of special words can diminish readability if special words are allowed to be used as names for program variables.
Form and meaning: when semantics (meaning) does not follow directly from syntax (form), it will be harder to read. (i.e. when two language constructs appear the same, but have 2 different meanings like reserved word "static" in C) - 7WritabilityA measure of how easily a language can be used to create programs for a chosen problem domain.
Factors affecting writability include:
1. Simplicity and Orthogonality
2. Expressivity - 8ExpressivityA set of relatively convenient ways of specifying operations
In C, the notation count++ is more convenient to write than count = count + 1 - 9ReliabilityA reliable program is one that performs to its specifications under all conditions.
Factors that affect reliability:
1. Type Checking
2. Exception Handling
3. Aliasing
4. Readability and Writability - 10Type CheckingTesting for type errors in a given program, either by the compiler or during run-time.
Run-time type checking is expensive.
Compile-time checking is more desirable.
The earlier a problem is detected, the better. - 11Exception HandlingThe ability of a program to intercept run-time errors (and other unusual conditions), take corrective measures, and then continue on.
- 12AliasingHaving two or more distinct names in a program that can be used to access the same memory cell.
Ex. When two pointers are set to point to the same variable. - 13Cost1. Cost of training programmers
2. Cost of writing programs in the language
3. Cost of executing programs written in a language (optimization alleviates this cost)
4. Cost of poor reliability
5. Cost of maintenance - 14PortabilityThe ease with which programs can be moved from one implementation to another.
Ex. Java programs owed to Java Virtual Machines being free and easy to download
Informationen
- Beschreibung
- Why study programming languages and how to evaluate a programming language.
- Erstellt von
- Amy Dang
- Aufrufe
- 57
- Tags
- Bewertung