Chapter 1 Review Questions
What does it mean for a program to be reliable?
A program is said to be reliable if it performs to its specifications under all conditions.
What is aliasing?
Aliasing is two or more distinct names that can be used to access the same memory cell.
Why is it useful for a programmer to have some background in language design, even though he or she may never actually design a programming language?
Because it will increate the ability to express ideas and choosing the most suitable language to create some program. Also it will make it easier to learn another programming language because we already know key concepts
In What language is most of UNIX written?
C
What is one example of a lack of orthogonality as a primary design criterion?
C has 2 structured data types (arrays and structs) arrays can be returned from functions but structs can't.
What are the three general methods of implementing a programming language?
Compilation, pure interpretation, hybrid implementation systems
Which produces faster program execution, a compiler or a pure interpreter?
Compiler.
What are the three fundamental features of an object-oriented programming language?
Data abstraction, inheritance and dynamic (run-time) method.
How can user-defined operator overloading harm the readability of a program?
If the operations are used in odd unintuitive ways.
What is the name of the category of programming languages whose structure is dictated by the von Neumann computer architecture?
Imperative languages
What does a linker do?
In computing, a linker or link editor is a computer system program that takes one or more object files (generated by a compiler or an assembler) and combines them into a single executable file, library file, or another "object" file.
What two programming language deficiencies were discovered as a result of the research in software development in the 1970s?
Incompleteness of type checking and inadequacy of control statements
Why is the von Neumann bottleneck important?
It limits the speed of a computer
What is the disadvantage of having too many features in a language?
It tends to lead to knowing only a subset.
What language used orthogonality as a primary design criterion?
Language that used orthogonality as a primary design criterion is ALGOL 68. The main aims and principles of design of ALGOL 68 : 1. Completeness and clarity of design 2. Orthogonal design 3. Security 4. Efficiency : Static mode checking, mode-independent parsing, Independent compilation, Loop optimization, representations - in minimal & larger character sets.
What programming language has dominated artificial intelligence over the past 50 years?
Lisp (List Processing) is one of programming language with a long history and a distinctive, fully parenthesized polish prefix notation. this is the second oldest high level programming language in widespread and also has changed a great deal since its early days. it was originally created as a practical mathematical notation for computer programs, influenced by the notation of Alonzo Church's lambda calculus. it quickly became the favored programming language for AI (artificial intelligence) research. Lisp pioneered tree data structures, automatic storage management, dynamic typing, and the self-hosting compiler.
How is the cost of compilers for a given language related to the design of that language?
Many run time checks will prohibit fast code execution. If optimization is used compiling will be slower but execution will be faster.
Why is readability important to writability?
Readability is important to writability because if programming language is difficult to read and understand then it can be difficult for a programmer to create new code that might need to interact or use other code.
What is an example of two language design criteria that are in direct conflict with each other?
Reliability and cost of execution
What language was the first to support the three fundamental features of object-oriented programming?
Smalltalk.
What construct of a programming language provides process abstraction?
Subprograms.
What have been the strongest influences on programming language design over the past 50 years?
The basic architecture of computers (von Neumann).
What are the advantages of implementing a language with a pure interpreter?
The main advantage of implementing a language with a pure interpreter is that a pure interpreter allows for implementation of many source level debugging operations, because many run-time error messages can refer to source level units.
What primitive control statement is used to build more complicated control statements in languages that lack them?
The selection statement plus GOTO is used to build more complicated control statements such as FOR loop.
Why is type checking the parameters of a subprogram important?
because it can lead to lots of hard to debug errors.
What is Exception Handling?
is the process of responding to the occurrence during computation, often changing the normal flow of program execution and provided by specialized programming language constructs or computer hardware mechanisms. it is able to intercept run-time errors or take corrective measures. Commonly, it is resolved by saving the current state of execution.
How can knowledge of programming language characteristics benefit the whole computing community?
it will provide insight on what functionally that certain languages provide works well, and what doesn't work well. this also will allow programmers design languages that contain the great characteristics of languages.
What programming language has dominated business applications over the past 50 years?
programming language that has dominated business applications over the past 50 years is COBOL. COBOL is an acronym for Common Business-Oriented Language. this programming language is one of the oldest programming languages, primarily designed by Grace Hopper. Defining its primary domain in business, finance, and administrative systems for companies and governments.
What programming language has dominated scientific computing over the past 50 years?
programming language that has dominated scientific computing over the past 50 years is Fortran. It is still used because the primary concern of scientific applications is efficiency.
What role does the symbol table play in a compiler?
the symbol table serves as a database for the compilation process in a compiler.