David's Guide to CS

8/23/2021

Jump to Section

Definitions:

  1. programming language: A system of communicating computational ideas between people and computing machines.
  2. high-level programming language: A programming language that is independent of any particular machine architecture.
  3. syntax: The rules for constructing structurally valid (note: valid, not correct) computer programs in a particular language.
  4. names: A means of identifying “entities” in a programming language.
  5. types: A type denotes the kinds of values that a program can manipulate. (A more specific definition will come later in the course).
  6. semantics: The effect of each statement’s execution on the program’s operation.

Concepts:

There are four fundamental components of every programming language: syntax, names, types, and semantics.

Practice:

  • For your favorite programming language, attempt to explain the most meaningful parts of its syntax. Think about what are valid identifiers in the language, how statements are separated, whether blocks of code are put inside braces, etc.

  • Next, ask yourself how your favorite language handles types. Are variables in the language given types explicitly or implicitly? If the language is compiled, are types assigned to variables before the code is compiled or as the program executes? These are issues that we will discuss in detail in Module 2.

  • Finally, think about how statements in your favorite programming language affect the program’s execution. Does the language have loops? if-then statements? function composition? goto?