Chapter 1: Preliminaries — Concepts of Programming Languages

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/31

flashcard set

Earn XP

Description and Tags

Flashcards covering the key concepts from Chapter 1: Preliminaries of the programming languages course notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

32 Terms

1
New cards

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.

2
New cards

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.

3
New cards

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).

4
New cards

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.

5
New cards

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.

6
New cards

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.

7
New cards

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.

8
New cards

Which language dominated scientific applications for decades?

Fortran.

9
New cards

Which language dominated business applications?

COBOL.

10
New cards

Which languages were prominent in artificial intelligence before 1990?

Lisp and Prolog.

11
New cards

What languages are associated with Web scripting?

JavaScript and PHP; HTML is a markup language used for content layout and can embed scripting.

12
New cards

What are the four major language evaluation criteria highlighted in this chapter?

Readability, Writability, Reliability, and Cost (with portability and generality as additional considerations).

13
New cards

What does readability in a programming language depend on?

Simplicity, orthogonality, data types, and syntax design.

14
New cards

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.

15
New cards

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.

16
New cards

Why are data types important for readability?

Having explicit data types (e.g., Boolean) makes statements unambiguous (timeout = true vs timeout = 1).

17
New cards

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.

18
New cards

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.

19
New cards

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.

20
New cards

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.

21
New cards

What is exception handling?

The ability of a program to intercept, handle, and recover from run-time errors or unusual conditions.

22
New cards

What factors constitute the overall cost of a programming language?

Training cost, writing cost (writability), execution cost, maintenance cost, and reliability-related costs.

23
New cards

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.

24
New cards

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.

25
New cards

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.

26
New cards

What are the three general methods of implementing programming languages?

Compilation, pure interpretation, and hybrid implementation.

27
New cards

Which implementation method yields the fastest execution after translation?

Compilation.

28
New cards

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).

29
New cards

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.

30
New cards

What is a preprocessor?

A program that processes code before compilation, expanding macros and including other files (e.g., #include, #define in C).

31
New cards

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.

32
New cards

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.