1/31
Flashcards covering the key concepts from Chapter 1: Preliminaries of the programming languages course notes.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is one major benefit of studying programming language concepts related to expressing ideas?
Increased capacity to express ideas; greater expressive power allows deeper abstraction and the possibility to simulate features not directly supported.
How does studying programming languages help in selecting languages for a project?
Provides an improved background for choosing appropriate languages; understanding language features helps match languages to problems, and integrated features are generally preferable to ad hoc simulations.
Why is learning programming language concepts helpful when learning new languages?
It makes it easier to learn new languages because fundamental concepts (types, control, abstraction) transfer, and helps understand how features are implemented (e.g., OOP in Ruby).
What does the TIOBE index indicate in this context?
Relative popularity of programming languages; for example, Java, C, C++, and C# were among the most popular in 2017, with language popularity continually changing.
What is a key benefit of understanding implementation issues for programmers?
Leads to better use of languages, helps explain design choices, and can reveal bugs related to implementation details.
Why is it useful to know languages beyond those you currently use?
To learn features you may not be using and to write more natural, reliable code rather than relying on simulations.
Which language is cited as potentially better for scientific computing but did not displace Fortran in the 1960s?
ALGOL 60; cited for its elegant features like block structure and recursion, though adoption favored Fortran.
Which language dominated scientific applications for decades?
Fortran.
Which language dominated business applications?
COBOL.
Which languages were prominent in artificial intelligence before 1990?
Lisp and Prolog.
What languages are associated with Web scripting?
JavaScript and PHP; HTML is a markup language used for content layout and can embed scripting.
What are the four major language evaluation criteria highlighted in this chapter?
Readability, Writability, Reliability, and Cost (with portability and generality as additional considerations).
What does readability in a programming language depend on?
Simplicity, orthogonality, data types, and syntax design.
What is orthogonality in language design?
A small set of primitives that can be combined in a small number of ways; all combinations are legal and meaningful, independently of context.
Why is orthogonality illustrated with VAX vs IBM architectures?
VAX is orthogonal (one instruction can use registers or memory in any combination), while IBM’s design is more restricted, making it less writable.
Why are data types important for readability?
Having explicit data types (e.g., Boolean) makes statements unambiguous (timeout = true vs timeout = 1).
What role does syntax design play in readability?
The form of language elements and the alignment of semantics with syntax; choices like reserved words as identifiers affect clarity.
What is writability and why is it important?
Writability measures how easily a language can be used to write programs; excessive construct variety can hinder it despite expressivity.
What is aliasing and why is it a reliability concern?
Aliasing occurs when two or more names access the same memory cell; changes through one name affect the others, reducing reliability.
What is type checking and why is it important?
The process of ensuring type correctness, ideally at compile time, to detect errors early and improve reliability.
What is exception handling?
The ability of a program to intercept, handle, and recover from run-time errors or unusual conditions.
What factors constitute the overall cost of a programming language?
Training cost, writing cost (writability), execution cost, maintenance cost, and reliability-related costs.
What is von Neumann architecture and its relevance to language design?
Memory stores both data and instructions; CPU executes instructions; this architecture underpins imperative languages and their design.
What programming design methodologies influenced language design?
Top-down design, stepwise refinement, data-oriented design, data abstraction, SIMULA, inheritance, dynamic binding, and object-oriented design.
What are the four language categories discussed, and what caveat is noted about OO?
Imperative, functional, logic, and object-oriented; OO is not treated as a separate category because it emerges from imperative languages; scripting and markup are also discussed.
What are the three general methods of implementing programming languages?
Compilation, pure interpretation, and hybrid implementation.
Which implementation method yields the fastest execution after translation?
Compilation.
What is a Just-In-Time (JIT) system?
Translates to intermediate language and compiles to machine code at runtime for subsequent calls (e.g., Java, .NET).
What is a linker and what is a load module?
The linker connects a program to system libraries and other modules; the load module is the executable image produced after linking.
What is a preprocessor?
A program that processes code before compilation, expanding macros and including other files (e.g., #include, #define in C).
What is a programming environment?
The collection of tools used to develop software (editors, compilers, debuggers, linkers); examples include UNIX-based tools, JBuilder, Visual Studio .NET, NetBeans.
What is the main takeaway about language design from the chapter summary?
Programming languages enhance expressiveness and aid learning; evaluation criteria guide design; architecture and software methodologies shape design; multiple implementation approaches exist.