concept reference

Basics of Programming serves as a syntax lookup for core constructs across different languages. While syntax changes, the underlying concepts map to the same CPU Instructions.


1. Variables & Mutability

Variables are named storage locations in memory.

  • Statically Typed (C, Rust): The type is known at compile time, determining the exact memory size on the Stack(s).
  • Dynamically Typed (Python): Variables are references to objects on the Heap(s), resolved at runtime.

2. Conditionals (Branching)

Control flow allows the program to make decisions. At the hardware level, these compile down to Jump or Branch instructions based on flags set by the ALU.


3. Loops (Iteration)

Repeating code blocks. Loops are the primary driver of Time Complexity. Correctness is often proven via Loop Invariants.


4. Functions

Reusable blocks of code. Calling a function creates a new Stack Frame in memory to hold arguments and local variables.


5. Arrays & Collections

Storing multiple values.


6. Error Handling

How the language deals with failure.


7. Data Structures (Structs)

Defining custom types.