Chapter 1 Flashcards
Why should Concepts of programming languages be studied?
Programming is new.
General language concept knowledge helps.
Increased ability to express ideas.
“ “ to learn new languages.
Helps choose appropriate languages.
Understand tradeoffs.
Overall advancement of computing
What are the Language Evaluation Criteria?
Readability, Writability, Reliability, Cost
What is Readability defined as?
The ease with which programs can be read and understood
What is Writability defined as?
The ease with which a language can be used to create programs
What is Reliability defined as?
Whether a language performs to its specifications under all conditions
What is Cost defined as?
cost of using the language
What is the Evaluation Criteria for Readability?
Overall simplicity: Manageable set of features and constructs(minimal feature multiplicity, minimal operator overloading)
Orthogonality: small set of primitive constructs can be combined in small number of ways
Data types; if types are missing, they must be simulated
Syntax considerations: Lack of naming restrictions increase readability (Identifier forms). More special words = more readable (Special words). meaningful keywords, avoid language constructs with same name and different meaning(Form and meaning)
Why is a lack of orthogonality bad?
It can lead to exceptions
Why is too much orthogonality bad?
bad for readability
What is the problem with too much simplicity?
Can be bad for readability
What is the Evaluation Criteria for Writability?
Simplicity and orthogonality: few constructs, small number of primitives, small set of rules for combining them
Support for abstraction: define and use complex structures/operations.(Process abstraction and Data abstraction)
Expressivity: convenient ways of specifying operations. Strength + number of operators and predefined functions
What is process abstraction?
Provision for subprograms
What is data abstraction?
classes, pointer & dynamic memory
What is the Evaluation Criteria for Reliability?
Type checking: Test for type errors. Compile time checking > run time checking
Exception handling: intercept run time errors and correct it
Aliasing: Presence of 2+ distinct referencing names for same memory location. (dangerous feature)
Readability and writability: non-natural ways of expressing algorithms = unnatural approaches = reduced reliability
What is the Evaluation Criteria for Cost?
Training new programmers.
Writing programs
compiling programs
Executing programs
Language implementation system (availability of free compilers)
Reliability(poor = high cost)
Maintaining programs