Programming Language

We use programming languages to talk to computers, but how does it work? Here we discuss a few concepts about programming languages including types, syntax, and execution flow.

Type

Static type means the type of every variable is known at compile-time, while dynamic type indicates that some variables have unknown type at compile-time, and are figured out later during run-time.

Layout

In a source code file, we can organize the code as the following for better readability.

  1. Dependency imports
  2. Global constants
  3. Global variables
  4. Type definition A which is based on type definition B
  5. Type definition B
  6. Function definition A which is based on function definition B
  7. Function definition B

Syntax

For loop vs while loop

Execution flow

Human readable source code has to go through a sequence of operations to become electronic signals on a silicon chip.

See also

←Previous Next→