Compiled & Typed Languages

Compiled & Typed Languages

Content Overview

  1. 1. Introduction to High‑Level Languages
    1. 1.1. The Simple Explanation
    2. 1.2. High‑Level vs Low‑Level – The Big Picture
    3. 1.3. How These Languages Run on Your Computer
    4. 1.4. What Is a Programming Paradigm?
  2. 2. High‑Level Languages — Compiled & Typed | System, Desktop, Game, Mobile & App Dev
    1. 2.1. Procedural Paradigm
      1. 2.1.1. What Is Procedural Programming?
      2. 2.1.2. Sequence — Do Things in Order
      3. 2.1.3. Variables and Data Types
      4. 2.1.4. Selection — Making Decisions
      5. 2.1.5. Iteration — Doing Things Repeatedly
      6. 2.1.6. Functions — Reusable Blocks of Code
      7. 2.1.7. The Procedural Languages
        1. 2.1.7.1. Fortran (Procedural — Compiled) — Scientific & Engineering
          1. 2.1.7.1.1. NumPy‑style Arrays, HPC, NASA & Research
        2. 2.1.7.2. Pascal (Procedural — Compiled) — Education & Legacy Systems
          1. 2.1.7.2.1. Delphi (RAD Framework) — Desktop & Enterprise Apps
        3. 2.1.7.3. C (Procedural — Compiled) — Systems & Embedded
          1. 2.1.7.3.1. GCC / Clang (Compilers)
          2. 2.1.7.3.2. POSIX & Linux Kernel Development
          3. 2.1.7.3.3. Embedded C — Microcontrollers, IoT
          4. 2.1.7.3.4. OpenSSL, SQLite (Built in C)
    2. 2.2. Object‑Oriented Paradigm (OOP)
      1. 2.2.1. The Real‑World Analogy
      2. 2.2.2. Classes and Objects
      3. 2.2.3. Pillar 1 — Encapsulation
      4. 2.2.4. Pillar 2 — Inheritance
      5. 2.2.5. Pillar 3 — Polymorphism
      6. 2.2.6. Pillar 4 — Abstraction
      7. 2.2.7. OOP Design Patterns
      8. 2.2.8. SOLID Principles
      9. 2.2.9. The Object‑Oriented Languages
        1. 2.2.9.1. C++ (OOP — Compiled) — Systems, Desktop & Games
          1. 2.2.9.1.1. STL (Standard Template Library)
          2. 2.2.9.1.2. Unreal Engine (Game Dev)
          3. 2.2.9.1.3. Qt (Desktop GUI Framework)
          4. 2.2.9.1.4. OpenCV (Computer Vision)
          5. 2.2.9.1.5. Boost (Libraries)
          6. 2.2.9.1.6. CMake (Build System)
        2. 2.2.9.2. Java (OOP — Compiled to Bytecode — JVM) — Enterprise & Android
          1. 2.2.9.2.1. Spring Boot (Framework) — Enterprise & Microservices
          2. 2.2.9.2.2. Hibernate (ORM) — Database
          3. 2.2.9.2.3. Maven / Gradle (Build Tools)
          4. 2.2.9.2.4. Android SDK (Mobile Dev)
          5. 2.2.9.2.5. Jakarta EE (Enterprise Edition)
          6. 2.2.9.2.6. JUnit (Testing)
        3. 2.2.9.3. Kotlin (OOP + Functional — Compiled — JVM) — Android & Cross‑Platform
          1. 2.2.9.3.1. Jetpack Compose (UI Framework) — Android
          2. 2.2.9.3.2. Ktor (Framework) — Backend & API
          3. 2.2.9.3.3. Kotlin Multiplatform (Cross‑Platform)
          4. 2.2.9.3.4. Coroutines (Async & Concurrency)
          5. 2.2.9.3.5. Gradle KTS (Build Scripts)
        4. 2.2.9.4. Swift (OOP + Functional — Compiled) — iOS & macOS
          1. 2.2.9.4.1. SwiftUI (UI Framework) — Apple Ecosystem
          2. 2.2.9.4.2. UIKit (Legacy UI Framework)
          3. 2.2.9.4.3. Combine (Reactive Framework)
          4. 2.2.9.4.4. Vapor (Backend Framework)
          5. 2.2.9.4.5. XCTest (Testing)
          6. 2.2.9.4.6. Swift Package Manager
        5. 2.2.9.5. Dart (OOP — Compiled) — Cross‑Platform Mobile, Web & Desktop
          1. 2.2.9.5.1. Flutter (UI Framework) — iOS, Android, Web & Desktop
          2. 2.2.9.5.2. Dart DevTools (Debugging & Profiling)
          3. 2.2.9.5.3. pub.dev (Package Manager)
          4. 2.2.9.5.4. Riverpod / Bloc (State Management)
        6. 2.2.9.6. C# (OOP — Compiled — .NET) — Desktop, Enterprise & Games
          1. 2.2.9.6.1. .NET / ASP.NET Core (Web & API Framework)
          2. 2.2.9.6.2. Unity (Game Engine)
          3. 2.2.9.6.3. Xamarin / MAUI (Cross‑Platform Mobile)
          4. 2.2.9.6.4. Entity Framework (ORM)
          5. 2.2.9.6.5. Blazor (Web UI Framework)
          6. 2.2.9.6.6. NuGet (Package Manager)
    3. 2.3. Functional Paradigm
      1. 2.3.1. The Mathematical Way of Thinking
      2. 2.3.2. Pure Functions
      3. 2.3.3. Immutability
      4. 2.3.4. Higher‑Order Functions
      5. 2.3.5. map, filter, reduce
      6. 2.3.6. Closures
      7. 2.3.7. Recursion
      8. 2.3.8. The Functional Languages
        1. 2.3.8.1. F# (Functional — Compiled — .NET) — Financial & Data
          1. 2.3.8.1.1. .NET Interop (C# Integration)
          2. 2.3.8.1.2. Fable (F# to JavaScript)
          3. 2.3.8.1.3. Ionide (VS Code Extension)
        2. 2.3.8.2. Haskell (Functional — Compiled) — Academic & Research
          1. 2.3.8.2.1. GHC (Glasgow Haskell Compiler)
          2. 2.3.8.2.2. Cabal / Stack (Package & Build Tools)
          3. 2.3.8.2.3. Yesod (Web Framework)
        3. 2.3.8.3. Scala (Functional + OOP — Compiled — JVM) — Data Engineering & Backend
          1. 2.3.8.3.1. Apache Spark (Big Data)
          2. 2.3.8.3.2. Akka (Concurrency & Distributed)
          3. 2.3.8.3.3. Play Framework (Web)
          4. 2.3.8.3.4. sbt (Build Tool)
    4. 2.4. Systems & Memory‑Safe Paradigm
      1. 2.4.1. Rust (Systems — Compiled — Memory Safe) — Systems, WebAssembly & Embedded
        1. 2.4.1.1. Cargo (Package Manager & Build Tool)
        2. 2.4.1.2. Tokio (Async Runtime)
        3. 2.4.1.3. Actix / Axum (Web Frameworks)
        4. 2.4.1.4. WebAssembly (WASM Target)
        5. 2.4.1.5. Embedded Rust (Microcontrollers)
        6. 2.4.1.6. Clippy (Linter)
      2. 2.4.2. Go (Procedural + Concurrent — Compiled) — Backend, Cloud & DevOps
        1. 2.4.2.1. Gin / Echo (Web Frameworks)
        2. 2.4.2.2. gRPC (Remote Procedure Calls)
        3. 2.4.2.3. Docker & Kubernetes (Written in Go)
        4. 2.4.2.4. Go Modules (Package Manager)
        5. 2.4.2.5. Goroutines & Channels (Concurrency)
    5. 2.5. Logic Paradigm
      1. 2.5.1. Prolog (Logic — Interpreted) — AI & Knowledge Systems
        1. 2.5.1.1. SWI‑Prolog (Runtime)
        2. 2.5.1.2. Constraint Logic Programming
        3. 2.5.1.3. Expert Systems & NLP
  3. 3. Scripting Languages (high‑level) — Web & App Development | Frontend, Backend & Full‑Stack
    1. 3.1. Foundations
      1. 3.1.1. What is a Scripting Language?
      2. 3.1.2. Interpreted vs Compiled
      3. 3.1.3. Dynamic Typing & Prototypal Inheritance
      4. 3.1.4. Event‑Driven & Async Programming
      5. 3.1.5. Role in Web Ecosystems — Client vs Server
      6. 3.1.6. Package Managers — npm, pip, composer, bundler
      7. 3.1.7. Runtime Environments — Browser, Node.js, Deno, Bun
    2. 3.2. JavaScript (Multi‑Paradigm — Interpreted/JIT) — Web, Mobile & Desktop
      1. 3.2.1. Frontend JavaScript — Libraries & Frameworks
        1. 3.2.1.1. React JS (Library) — UI Components
          1. 3.2.1.1.1. Next.js (Framework) — SSR & SSG
          2. 3.2.1.1.2. Redux (Library) — State Management
          3. 3.2.1.1.3. Vite (Tool) — Dev Server & Build
        2. 3.2.1.2. Angular (Framework) — Enterprise Frontend
          1. 3.2.1.2.1. TypeScript (Superset) — Typed JS
          2. 3.2.1.2.2. RxJS (Library) — Reactive Programming
        3. 3.2.1.3. Vue.js (Framework) — Progressive UI
          1. 3.2.1.3.1. Nuxt.js (Framework) — SSR & SSG
          2. 3.2.1.3.2. Pinia (Library) — State Management
          3. 3.2.1.3.3. Vuex (Library) — Legacy State
        4. 3.2.1.4. Svelte (Compiler‑Based Framework) — Lightweight UI
          1. 3.2.1.4.1. SvelteKit (Framework) — Full‑Stack
        5. 3.2.1.5. React Native (Framework) — Cross‑Platform Mobile
        6. 3.2.1.6. Ionic (Framework) — Hybrid Mobile
        7. 3.2.1.7. NativeScript (Framework) — Native Mobile
        8. 3.2.1.8. Electron.js (Framework) — Cross‑Platform Desktop
        9. 3.2.1.9. WebAssembly (WASM) — Performance in Browser
      2. 3.2.2. Backend JavaScript — Libraries & Frameworks
        1. 3.2.2.1. Node.js (Runtime) — Server‑Side JavaScript
          1. 3.2.2.1.1. Express.js (Framework) — Web & API
          2. 3.2.2.1.2. Koa (Framework) — Lightweight API
          3. 3.2.2.1.3. NestJS (Framework) — Enterprise API
          4. 3.2.2.1.4. Socket.IO (Library) — Real‑Time
        2. 3.2.2.2. Fastify (Framework) — High Performance API
        3. 3.2.2.3. Deno (Runtime) — Secure Server
        4. 3.2.2.4. Bun (Runtime) — Fast Runtime & Bundler
      3. 3.2.3. Full‑Stack JavaScript Development — Web Apps
    3. 3.3. Python — The Friendly Language
      1. 3.3.1. Django (Framework) — Web & API
        1. 3.3.1.1. Django REST Framework (API)
        2. 3.3.1.2. Celery (Task Queue)
      2. 3.3.2. Flask (Micro‑Framework) — Lightweight Web & API
      3. 3.3.3. FastAPI (Framework) — High Performance API
      4. 3.3.4. pip / Poetry (Package Managers)
      5. 3.3.5. NumPy / Pandas (Data Libraries)
      6. 3.3.6. TensorFlow / PyTorch (AI & ML)
    4. 3.4. Ruby — The Happy Language
      1. 3.4.1. Ruby on Rails (Framework) — Full‑Stack Web
        1. 3.4.1.1. Active Record (ORM)
        2. 3.4.1.2. Action Cable (WebSockets)
      2. 3.4.2. Sinatra (Micro‑Framework) — Lightweight Web
      3. 3.4.3. Bundler / RubyGems (Package Manager)
    5. 3.5. PHP — The Web Server Language
      1. 3.5.1. Laravel (Framework) — Web & API
        1. 3.5.1.1. Livewire (Library) — Reactive UI
        2. 3.5.1.2. Sanctum / Passport (Auth)
      2. 3.5.2. WordPress (CMS) — Web & Blogging
      3. 3.5.3. Magento (Framework) — E‑Commerce
      4. 3.5.4. Symfony (Framework) — Enterprise Web
      5. 3.5.5. Composer (Package Manager)
    6. 3.6. Bash — The Linux Automation Language
    7. 3.7. PowerShell — The Windows Automation Language
    8. 3.8. Lua — The Tiny Embeddable Language
    9. 3.9. Perl — Scripting & Text Processing
      1. 3.9.1. CPAN (Package Repository)
      2. 3.9.2. Mojolicious (Web Framework)
      3. 3.9.3. Text Processing & Regex Engine
      4. 3.9.4. Legacy Web & Bioinformatics
  4. 4. Domain‑Specific Languages (high‑level) — Special Purpose | Data, Query, Config & Markup
    1. 4.1. Foundations
      1. 4.1.1. What is a Domain‑Specific Language?
      2. 4.1.2. DSL vs General Purpose Language
      3. 4.1.3. Internal vs External DSL
      4. 4.1.4. Declarative Nature of DSLs
      5. 4.1.5. Where & Why DSLs Are Used
    2. 4.2. Markup Languages — Structure & Presentation
      1. 4.2.1. HTML (Markup) — Web Structure
        1. 4.2.1.1. HTML5 Semantics & Accessibility
        2. 4.2.1.2. Forms, Media & Embedding
        3. 4.2.1.3. Web Components
        4. 4.2.1.4. Canvas & SVG
      2. 4.2.2. XML (Markup) — Data & Config Structure
        1. 4.2.2.1. XPath (Query)
        2. 4.2.2.2. XSLT (Transformation)
        3. 4.2.2.3. XML Schema / DTD (Validation)
      3. 4.2.3. Markdown — Docs & Content
      4. 4.2.4. LaTeX — Academic & Scientific Publishing
      5. 4.2.5. reStructuredText — Python Docs & Technical Writing
    3. 4.3. Query Languages — Data Retrieval & Management
      1. 4.3.1. SQL (Relational) — Database Queries
        1. 4.3.1.1. MySQL / PostgreSQL / SQLite
        2. 4.3.1.2. Joins, Indexes, Transactions
        3. 4.3.1.3. Stored Procedures & Views
      2. 4.3.2. GraphQL (API Query Language) — Flexible Data Fetching
        1. 4.3.2.1. Apollo (Client & Server)
        2. 4.3.2.2. Hasura (Auto GraphQL API)
      3. 4.3.3. SPARQL (Semantic) — Linked Data & RDF Queries
      4. 4.3.4. XQuery (XML) — XML Data Querying
    4. 4.4. Data & Config Languages
      1. 4.4.1. JSON — Data Interchange & APIs
      2. 4.4.2. YAML — Config & DevOps Automation
      3. 4.4.3. TOML — Config Files (Rust, Python)
      4. 4.4.4. CSV / TSV — Tabular Data Exchange
      5. 4.4.5. HCL (HashiCorp) — Terraform & Infrastructure as Code
      6. 4.4.6. Dockerfile — Container Definition
      7. 4.4.7. Kubernetes YAML — Orchestration Config
      8. 4.4.8. .env / INI — Environment & App Config
    5. 4.5. Statistical & Scientific Computing
      1. 4.5.1. R (Functional) — Statistical Computing & Visualization
        1. 4.5.1.1. ggplot2 (Visualization)
        2. 4.5.1.2. tidyverse (Data Wrangling)
        3. 4.5.1.3. Shiny (Web Apps)
        4. 4.5.1.4. RStudio (IDE)
      2. 4.5.2. MATLAB (Matrix) — Scientific & Engineering
        1. 4.5.2.1. Simulink (Model‑Based Design)
        2. 4.5.2.2. Signal & Image Processing Toolboxes
        3. 4.5.2.3. Control Systems Toolbox
      3. 4.5.3. Julia (High‑Performance) — Scientific Computing
        1. 4.5.3.1. Flux.jl (ML)
        2. 4.5.3.2. Plots.jl (Visualization)
    6. 4.6. Hardware Description Languages
      1. 4.6.1. VHDL — Digital Circuit Design
      2. 4.6.2. Verilog — Hardware Description
      3. 4.6.3. SystemC — System‑Level Modeling
    7. 4.7. Shader & Graphics Languages
      1. 4.7.1. GLSL — OpenGL Shading Language
      2. 4.7.2. HLSL — DirectX Shading Language
      3. 4.7.3. WGSL — WebGPU Shading Language
    8. 4.8. Build, Automation & Pattern DSLs
      1. 4.8.1. Makefile — Build Automation
      2. 4.8.2. Gradle DSL — Build Scripts (Java/Kotlin)
      3. 4.8.3. Ansible YAML — IT Automation
      4. 4.8.4. Regex (Regular Expressions) — Pattern Matching & Text Processing
      5. 4.8.5. Shell / Bash (Scripting) — System Automation
  5. 5. Putting It All Together
    1. 5.1. Procedural vs OOP vs Functional — When to Use Each
    2. 5.2. Multi‑Paradigm Languages
    3. 5.3. Language Selection Guide

1. Introduction to High‑Level Languages

1.1. The Simple Explanation

A high‑level language is a programming language that hides the messy details of the computer’s hardware – memory addresses, CPU registers, and binary instructions – so you can focus on solving problems. You write code that looks almost like English or mathematics.

Example – printing “Hello, world!”
In Python (high‑level):

print("Hello, world!")

In x86 assembly (low‑level):

section .data
    msg db 'Hello, world!', 0xA
section .text
    global _start
_start:
    mov rax, 1
    mov rdi, 1
    mov rsi, msg
    mov rdx, 13
    syscall
    mov rax, 60
    xor rdi, rdi
    syscall

High‑level means you say what to do; low‑level means you say exactly how the machine must do it. This abstraction lets you write software 10‑100 times faster, with far fewer bugs.

1.2. High‑Level vs Low‑Level – The Big Picture

The “level” refers to how close a language is to machine hardware. High‑level languages are far from hardware; low‑level languages are close.

FeatureHigh‑Level LanguageLow‑Level Language
Hardware abstractionHides detailsExposes registers, memory addresses
Memory managementAutomatic (garbage collector)Manual (malloc/free)
PortabilityRuns on any CPUCPU‑specific (x86, ARM, etc.)
Development speedVery fastSlow
PerformanceGood to excellentMaximum possible
Typical useWeb apps, data science, AIOS kernels, drivers, embedded firmware

Example – adding two numbers:
High‑level (Python): result = 5 + 3
Low‑level (C with pointers):

int a = 5, b = 3, result;
int *ptr = &result;
*ptr = a + b;

1.3. How These Languages Run on Your Computer

The execution model determines whether source code is translated to machine code before running, during running, or a mix of both.

ModelProcessExamples
Compiled (AOT)Source → machine code (executable) → run directlyC, C++, Rust, Go, Swift
InterpretedInterpreter reads and executes source line by linePython, Ruby, PHP, Bash
JIT (Just‑In‑Time)Source → bytecode → JIT compiles hot paths to native code at runtimeJava (JVM), C# (.NET), JavaScript (V8)

Example – compilation pipeline (C):

gcc -o program program.c   # compile
./program                  # run native binary

Example – interpretation (Python):

python script.py   # interpreter runs directly

1.4. What Is a Programming Paradigm?

A programming paradigm is a fundamental style of programming – a way of thinking about and organising code. It defines the structure, flow, and mental model of a program.

ParadigmCore IdeaExample Languages
ProceduralStep‑by‑step instructions, data and functions separateC, Pascal, Fortran
Object‑OrientedCode organised as objects (data + behaviour)Java, C++, Python, Kotlin
FunctionalComputation as mathematical functions, no side effectsHaskell, F#, Scala, Elixir
LogicProgram = facts + rules; inference engine derives answersProlog
Systems/Memory‑SafeLow‑level control with compile‑time memory safetyRust, Go

Most modern languages support multiple paradigm.

2. High‑Level Languages — Compiled & Typed | System, Desktop, Game, Mobile & App Dev

2.1. Procedural Paradigm

2.1.1. What Is Procedural Programming?

Procedural programming is the most straightforward style. A program is a sequence of statements executed in order, optionally grouped into reusable blocks called functions (or procedures). Data and functions are separate. It is like a recipe: step 1, then step 2, then step 3.

Recipe analogy:
Step 1: Boil water. Step 2: Add tea bag. Step 3: Pour water. Step 4: Remove bag. That is procedural.

2.1.2. Sequence — Do Things in Order

Statements run from top to bottom. Changing the order changes the result.

name = "Alice"
age = 30
print(f"{name} is {age} years old")   # Alice is 30 years old

2.1.3. Variables and Data Types

A variable is a named container for a value. Every value has a type that determines what operations are allowed.

TypeStoresExample
IntegerWhole numbers42, -7
FloatDecimal numbers3.14, -0.5
StringText"Hello", 'Python'
BooleanTrue/FalseTrue, False
List/ArrayOrdered collection[1, 2, 3]
Dictionary/MapKey‑value pairs{"name": "Alice"}
age = 25                     # integer
price = 19.99                # float
name = "Alice"               # string
is_student = True            # boolean
scores = [88, 92, 79]        # list
person = {"name": "Alice"}   # dictionary

2.1.4. Selection — Making Decisions

Selection (conditionals) allows the program to execute different blocks of code based on a condition.

temperature = 28
if temperature > 35:
    print("Very hot")
elif temperature > 25:
    print("Warm")
else:
    print("Cool")
# Output: Warm

2.1.5. Iteration — Doing Things Repeatedly

Iteration (loops) repeats a block of code multiple times.

  • for loop – iterate over a sequence (known number of times).
  • while loop – repeat while a condition is true.
# for loop
for i in range(5):
    print(i)          # 0 1 2 3 4

# while loop
count = 0
while count < 3:
    print("Looping")
    count += 1        # Looping (3 times)

2.1.6. Functions — Reusable Blocks of Code

A function is a named block of code that can be called with parameters and returns a value. It promotes code reuse and modularity.

def add(a, b):
    return a + b

result = add(3, 5)   # result = 8

2.1.7. The Procedural Languages

2.1.7.1. Fortran (Procedural — Compiled) — Scientific & Engineering

Fortran (Formula Translation) is the world’s first compiled high‑level language (1957). It was designed for scientific and numerical computing, making mathematical formulas easy to write.

program factorial
    integer :: n, fact
    n = 5
    fact = product([(i, i=1,n)])
    print *, "Factorial of 5 is", fact
end program factorial
2.1.7.1.1. NumPy‑style Arrays, HPC, NASA & Research

Fortran’s array operations directly inspired NumPy in Python. It still dominates supercomputing, weather modelling, and physics simulations at NASA, CERN, and ECMWF.

2.1.7.2. Pascal (Procedural — Compiled) — Education & Legacy Systems

Pascal (1970) was designed by Niklaus Wirth to teach structured programming. It enforces strong typing and clear begin/end blocks.

program Hello;
begin
    writeln('Hello, Pascal!');
end.
2.1.7.2.1. Delphi (RAD Framework) — Desktop & Enterprise Apps

Delphi is Object Pascal with a rapid application development environment. Still used for Windows desktop and enterprise legacy applications.

2.1.7.3. C (Procedural — Compiled) — Systems & Embedded

C (1972) is the most influential programming language ever created. It provides human‑readable syntax with direct memory access via pointers and manual memory management.

#include <stdio.h>
#include <stdlib.h>
int main() {
    int *ptr = (int*)malloc(sizeof(int));
    *ptr = 42;
    printf("%d\n", *ptr);
    free(ptr);
    return 0;
}
2.1.7.3.1. GCC / Clang (Compilers)

GCC (GNU Compiler Collection) and Clang (LLVM front‑end) are the standard C compilers. They translate C source to optimised machine code.

2.1.7.3.2. POSIX & Linux Kernel Development

The Linux kernel, Windows NT kernel, macOS XNU kernel – all major operating systems are written primarily in C.

2.1.7.3.3. Embedded C — Microcontrollers, IoT

Embedded C runs on microcontrollers (Arduino, STM32, ESP32) with kilobytes of RAM, no OS, and direct hardware register access. It is used in IoT, automotive ECUs, and medical devices.

2.1.7.3.4. OpenSSL, SQLite (Built in C)

Two foundational libraries written in C: OpenSSL (cryptography, SSL/TLS) and SQLite (the world’s most deployed embedded database).

2.2. Object‑Oriented Paradigm (OOP)

2.2.1. The Real‑World Analogy

Imagine describing a “Dog”. You would say: a dog has a name, breed, and age (attributes), and can bark, sit, and fetch (methods). In OOP, the class is the blueprint, and the object is a specific dog (e.g., Rex).

2.2.2. Classes and Objects

A class is a template. An object is an instance of that class. Each object has its own copy of the class’s attributes.

class Dog:
    def __init__(self, name, breed):
        self.name = name
        self.breed = breed
    def bark(self):
        print(f"{self.name} says Woof!")

rex = Dog("Rex", "Labrador")
rex.bark()   # Rex says Woof!

2.2.3. Pillar 1 — Encapsulation

Encapsulation hides internal data and only allows access through public methods. This protects the object’s state from invalid changes.

class BankAccount:
    def __init__(self):
        self.__balance = 0          # private attribute
    def deposit(self, amount):
        if amount > 0:
            self.__balance += amount
    def get_balance(self):
        return self.__balance

acc = BankAccount()
acc.deposit(100)
print(acc.get_balance())   # 100
# print(acc.__balance)     # error – private

2.2.4. Pillar 2 — Inheritance

Inheritance allows a class (child) to acquire all attributes and methods from another class (parent), and optionally extend or override them.

class Animal:
    def eat(self):
        print("Eating...")
class Cat(Animal):
    def meow(self):
        print("Meow")

cat = Cat()
cat.eat()    # from Animal
cat.meow()   # Cat’s own

2.2.5. Pillar 3 — Polymorphism

Polymorphism means “many forms”. The same method name can behave differently depending on the object’s actual class.

class Bird:
    def sound(self): return "Tweet"
class Dog:
    def sound(self): return "Woof"

animals = [Bird(), Dog()]
for a in animals:
    print(a.sound())   # Tweet, Woof

2.2.6. Pillar 4 — Abstraction

Abstraction hides complex implementation details and shows only the essential features. Abstract classes define a contract that subclasses must fulfill.

from abc import ABC, abstractmethod
class Shape(ABC):
    @abstractmethod
    def area(self): pass
class Circle(Shape):
    def __init__(self, r): self.r = r
    def area(self): return 3.14 * self.r * self.r

2.2.7. OOP Design Patterns

Design patterns are reusable solutions to common software design problems.

  • Singleton – ensures only one instance of a class exists (e.g., configuration manager).
  • Observer – allows objects to subscribe to events and be notified (e.g., GUI event listeners).
  • Factory – creates objects without specifying the exact class (e.g., creating different payment processors).

2.2.8. SOLID Principles

Five design principles for writing maintainable OOP code.

LetterPrincipleMeaning
SSingle ResponsibilityA class should have only one reason to change.
OOpen/ClosedOpen for extension, closed for modification.
LLiskov SubstitutionA subclass must be usable wherever its parent is used.
IInterface SegregationDon’t force classes to implement methods they don’t need.
DDependency InversionDepend on abstractions (interfaces), not concrete implementations.

2.2.9. The Object‑Oriented Languages

2.2.9.1. C++ (OOP — Compiled) — Systems, Desktop & Games

C++ adds OOP to C while maintaining backward compatibility. It supports multiple paradigms and zero‑cost abstractions. Used in games, OS, performance‑critical apps.

#include <iostream>
class Greeter {
public:
    void greet() { std::cout << "Hello, C++!" << std::endl; }
};
int main() {
    Greeter g;
    g.greet();
    return 0;
}
2.2.9.1.1. STL (Standard Template Library)

The STL provides generic containers (vector, map, set) and algorithms (sort, find), heavily using templates.

2.2.9.1.2. Unreal Engine (Game Dev)

Unreal Engine, written in C++, is used for AAA game development. Game logic can be extended with C++ for maximum performance.

2.2.9.1.3. Qt (Desktop GUI Framework)

Qt is a cross‑platform C++ framework for desktop and embedded GUI applications.

2.2.9.1.4. OpenCV (Computer Vision)

OpenCV is a computer vision library written in C++ with thousands of algorithms for image and video analysis.

2.2.9.1.5. Boost (Libraries)

Boost is a collection of peer‑reviewed C++ libraries that extend the standard library.

2.2.9.1.6. CMake (Build System)

CMake is a build system generator that creates platform‑specific build files (Makefiles, Visual Studio projects) from a single configuration.

2.2.9.2. Java (OOP — Compiled to Bytecode — JVM) — Enterprise & Android

Java compiles to bytecode that runs on the Java Virtual Machine, achieving “write once, run anywhere”. It uses automatic garbage collection.

public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello, Java!");
    }
}
2.2.9.2.1. Spring Boot (Framework) — Enterprise & Microservices

Spring Boot is a framework for building production‑ready microservices and enterprise Java applications with minimal configuration.

2.2.9.2.2. Hibernate (ORM) — Database

Hibernate maps Java objects to database tables, reducing SQL boilerplate.

2.2.9.2.3. Maven / Gradle (Build Tools)

Maven and Gradle are build automation tools that manage dependencies, compilation, testing, and packaging.

2.2.9.2.4. Android SDK (Mobile Dev)

The Android SDK provides APIs and tools for building native Android apps using Java or Kotlin.

2.2.9.2.5. Jakarta EE (Enterprise Edition)

Jakarta EE is a set of specifications (JPA, EJB, JMS, etc.) for large‑scale enterprise Java applications.

2.2.9.2.6. JUnit (Testing)

JUnit is the standard unit testing framework for Java.

2.2.9.3. Kotlin (OOP + Functional — Compiled — JVM) — Android & Cross‑Platform

Kotlin is a modern, statically typed language that runs on the JVM. It is fully interoperable with Java and adds null safety, data classes, coroutines, and extension functions.

fun main() {
    val name = "Kotlin"
    println("Hello, $name!")
}
2.2.9.3.1. Jetpack Compose (UI Framework) — Android

Jetpack Compose is a declarative UI toolkit for building native Android interfaces.

2.2.9.3.2. Ktor (Framework) — Backend & API

Ktor is a lightweight asynchronous framework for building servers and APIs in Kotlin.

2.2.9.3.3. Kotlin Multiplatform (Cross‑Platform)

Kotlin Multiplatform allows sharing business logic (not UI) across Android, iOS, web, and desktop.

2.2.9.3.4. Coroutines (Async & Concurrency)

Coroutines are lightweight concurrency primitives for writing asynchronous code sequentially.

2.2.9.3.5. Gradle KTS (Build Scripts)

Gradle KTS allows Gradle build scripts written in Kotlin DSL (type‑safe alternative to Groovy).

2.2.9.4. Swift (OOP + Functional — Compiled) — iOS & macOS

Swift is Apple’s modern language for iOS, macOS, watchOS, and tvOS. It is safe, fast, and expressive with features like optionals and protocol‑oriented programming.

var greeting = "Hello, Swift!"
print(greeting)
2.2.9.4.1. SwiftUI (UI Framework) — Apple Ecosystem

SwiftUI is a declarative UI framework for building user interfaces across all Apple platforms.

2.2.9.4.2. UIKit (Legacy UI Framework)

UIKit is the older imperative UI framework for iOS (still widely used).

2.2.9.4.3. Combine (Reactive Framework)

Combine is Apple’s declarative Swift framework for processing asynchronous events over time.

2.2.9.4.4. Vapor (Backend Framework)

Vapor is a server‑side Swift web framework for building APIs and backends.

2.2.9.4.5. XCTest (Testing)

XCTest is the official testing framework for Swift and Objective‑C.

2.2.9.4.6. Swift Package Manager

Swift Package Manager is the built‑in dependency manager and build tool for Swift projects.

2.2.9.5. Dart (OOP — Compiled) — Cross‑Platform Mobile, Web & Desktop

Dart is a client‑optimised language with sound null safety and AOT/JIT compilation. It is the language of Google’s Flutter framework.

void main() {
    print('Hello, Dart!');
}
2.2.9.5.1. Flutter (UI Framework) — iOS, Android, Web & Desktop

Flutter renders native‑quality applications from a single Dart codebase, using its own graphics engine (Skia/Impeller).

2.2.9.5.2. Dart DevTools (Debugging & Profiling)

Dart DevTools is a suite of performance and debugging tools for Dart and Flutter.

2.2.9.5.3. pub.dev (Package Manager)

pub.dev is the official package repository for Dart and Flutter.

2.2.9.5.4. Riverpod / Bloc (State Management)

Riverpod and Bloc are popular state management libraries for Flutter applications.

2.2.9.6. C# (OOP — Compiled — .NET) — Desktop, Enterprise & Games

C# is a modern, multi‑paradigm language developed by Microsoft. It combines the power of C++ with the simplicity of Java, adding LINQ, async/await, and properties.

using System;
class Program {
    static void Main() {
        Console.WriteLine("Hello, C#!");
    }
}
2.2.9.6.1. .NET / ASP.NET Core (Web & API Framework)

.NET and ASP.NET Core are cross‑platform frameworks for building web applications, REST APIs, and microservices.

2.2.9.6.2. Unity (Game Engine)

Unity is the world’s most popular game engine; C# is its primary scripting language.

2.2.9.6.3. Xamarin / MAUI (Cross‑Platform Mobile)

Xamarin and MAUI are frameworks for building native mobile apps using C#.

2.2.9.6.4. Entity Framework (ORM)

Entity Framework is an object‑relational mapper for .NET that reduces database access code.

2.2.9.6.5. Blazor (Web UI Framework)

Blazor is a framework for building interactive web UIs with C# instead of JavaScript, using WebAssembly.

2.2.9.6.6. NuGet (Package Manager)

NuGet is the official package manager for .NET.

2.3. Functional Paradigm

2.3.1. The Mathematical Way of Thinking

Functional programming treats computation as the evaluation of mathematical functions. It emphasises immutability (data never changes), pure functions (no side effects), and higher‑order functions (functions that take or return functions).

2.3.2. Pure Functions

A pure function always returns the same output for the same input and has no side effects (does not modify any external state).

def pure_add(a, b):
    return a + b   # no external state, no side effects

2.3.3. Immutability

Immutability means data cannot be changed after creation. Instead of modifying, you create new data.

original = [1, 2, 3]
new = original + [4]   # original unchanged

2.3.4. Higher‑Order Functions

A higher‑order function takes another function as an argument or returns a function.

def apply_twice(f, x):
    return f(f(x))

def square(x): return x * x
print(apply_twice(square, 2))   # 16

2.3.5. map, filter, reduce

Three essential higher‑order functions for processing collections declaratively.

  • map – transforms every element.
  • filter – selects elements that satisfy a condition.
  • reduce – combines all elements into a single value.
numbers = [1, 2, 3, 4, 5]
squared = list(map(lambda x: x*x, numbers))      # [1,4,9,16,25]
evens = list(filter(lambda x: x%2==0, numbers))  # [2,4]
from functools import reduce
total = reduce(lambda a,b: a+b, numbers)         # 15

2.3.6. Closures

A closure is a function that “remembers” the variables from its surrounding scope, even after that scope has finished executing.

def make_multiplier(factor):
    def multiply(x):
        return x * factor   # factor is captured from outer scope
    return multiply

double = make_multiplier(2)
print(double(5))   # 10

2.3.7. Recursion

Recursion is when a function calls itself to solve a smaller instance of the same problem. A base case stops the recursion.

def factorial(n):
    if n == 0:          # base case
        return 1
    return n * factorial(n - 1)   # recursive case

print(factorial(5))   # 120

2.3.8. The Functional Languages

2.3.8.1. F# (Functional — Compiled — .NET) — Financial & Data

F# is a functional‑first language on .NET, fully interoperable with C#. It excels at data transformation, financial modelling, and type‑driven design.

let square x = x * x
let numbers = [1;2;3;4]
let squares = List.map square numbers
printfn "%A" squares
2.3.8.1.1. .NET Interop (C# Integration)

F# can seamlessly call any C# library and vice versa, allowing incremental adoption.

2.3.8.1.2. Fable (F# to JavaScript)

Fable is a compiler that transforms F# code into JavaScript, enabling full‑stack functional programming.

2.3.8.1.3. Ionide (VS Code Extension)

Ionide is a plugin that provides a rich development environment for F# in Visual Studio Code.

2.3.8.2. Haskell (Functional — Compiled) — Academic & Research

Haskell is the purest functional language. It uses lazy evaluation, a powerful static type system, and the IO monad to manage side effects.

factorial 0 = 1
factorial n = n * factorial (n-1)
main = print (factorial 5)
2.3.8.2.1. GHC (Glasgow Haskell Compiler)

GHC is the standard Haskell compiler, known for its sophisticated optimisations.

2.3.8.2.2. Cabal / Stack (Package & Build Tools)

Cabal and Stack are build and package management tools for Haskell.

2.3.8.2.3. Yesod (Web Framework)

Yesod is a high‑performance web framework that uses Haskell’s type system for safety.

2.3.8.3. Scala (Functional + OOP — Compiled — JVM) — Data Engineering & Backend

Scala unifies OOP and functional programming on the JVM. It is the language of Apache Spark and is used for big data, distributed systems, and backend services.

object Hello {
    def main(args: Array[String]): Unit = {
        println("Hello, Scala!")
    }
}
2.3.8.3.1. Apache Spark (Big Data)

Apache Spark is the dominant distributed data processing framework, written in Scala.

2.3.8.3.2. Akka (Concurrency & Distributed)

Akka is a toolkit for building concurrent, distributed, and resilient actor‑based systems.

2.3.8.3.3. Play Framework (Web)

Play Framework is a reactive web framework for Scala and Java.

2.3.8.3.4. sbt (Build Tool)

sbt is the standard build tool for Scala projects.

2.4. Systems & Memory‑Safe Paradigm

2.4.1. Rust (Systems — Compiled — Memory Safe) — Systems, WebAssembly & Embedded

Rust guarantees memory safety (no null pointers, no use‑after‑free, no data races) without a garbage collector, using an ownership system and borrow checker enforced at compile time.

fn main() {
    let s = String::from("Hello, Rust!");
    println!("{}", s);
}
2.4.1.1. Cargo (Package Manager & Build Tool)

Cargo is the official build system and package manager for Rust, considered a gold standard.

2.4.1.2. Tokio (Async Runtime)

Tokio is an asynchronous runtime for building reliable, scalable network applications.

2.4.1.3. Actix / Axum (Web Frameworks)

Actix and Axum are high‑performance web frameworks for Rust.

2.4.1.4. WebAssembly (WASM Target)

Rust compiles to WebAssembly, enabling near‑native performance in web browsers.

2.4.1.5. Embedded Rust (Microcontrollers)

Embedded Rust can be used for embedded development on ARM Cortex‑M, ESP32, and RISC‑V, with no OS required.

2.4.1.6. Clippy (Linter)

Clippy is a collection of lints to catch common mistakes and improve Rust code style.

2.4.2. Go (Procedural + Concurrent — Compiled) — Backend, Cloud & DevOps

Go is a statically typed, compiled language designed at Google for simplicity, fast compilation, and built‑in concurrency (goroutines and channels).

package main
import "fmt"
func main() {
    fmt.Println("Hello, Go!")
}
2.4.2.1. Gin / Echo (Web Frameworks)

Gin and Echo are high‑performance web frameworks for building REST APIs in Go.

2.4.2.2. gRPC (Remote Procedure Calls)

gRPC is a high‑performance RPC framework widely used in microservices.

2.4.2.3. Docker & Kubernetes (Written in Go)

Both Docker (container runtime) and Kubernetes (container orchestration) are written in Go.

2.4.2.4. Go Modules (Package Manager)

Go Modules is the built‑in dependency management system for Go.

2.4.2.5. Goroutines & Channels (Concurrency)

Goroutines are lightweight threads, and channels are typed communication pipes that make concurrent programming safe and simple.

2.5. Logic Paradigm

2.5.1. Prolog (Logic — Interpreted) — AI & Knowledge Systems

Prolog (PROgramming in LOGic) is a declarative language where programs consist of facts and rules. The runtime uses unification and backtracking to answer queries.

parent(alice, bob).
parent(bob, carol).
ancestor(X,Y) :- parent(X,Y).
ancestor(X,Y) :- parent(X,Z), ancestor(Z,Y).
?- ancestor(alice, carol).   % true
2.5.1.1. SWI‑Prolog (Runtime)

SWI‑Prolog is the most widely used open‑source Prolog implementation.

2.5.1.2. Constraint Logic Programming

Constraint Logic Programming extends Prolog with constraint solving capabilities (e.g., scheduling, optimisation).

2.5.1.3. Expert Systems & NLP

Prolog has been used in rule‑based expert systems and natural language processing (e.g., parsing context‑free grammars).

3. Scripting Languages (high‑level) — Web & App Development | Frontend, Backend & Full‑Stack

3.1. Foundations

3.1.1. What is a Scripting Language?

A scripting language is typically interpreted, dynamically typed, and designed for rapid development, automation, and gluing systems together. Originally for short “scripts”, they now power large‑scale applications.

Key characteristics: no separate compilation step (run source directly), dynamic typing (variable types can change), excellent for string processing, file manipulation, and API calls. Often used for web development, automation, and data processing.

3.1.2. Interpreted vs Compiled

Interpreted languages are executed line by line at runtime by an interpreter; compiled languages are translated to machine code before execution.

AspectInterpretedCompiled
SpeedSlower (except JIT)Fastest
Development cycleWrite → runWrite → compile → run
PortabilityHigh (just need interpreter)Low (binary per platform)

3.1.3. Dynamic Typing & Prototypal Inheritance

In dynamic typing, variables do not have fixed types; a variable can hold an integer, then later a string. Prototypal inheritance (JavaScript) means objects inherit directly from other objects (instead of classes).

let x = 5;       // number
x = "hello";     // now string – allowed

3.1.4. Event‑Driven & Async Programming

Event‑driven programming reacts to external events (clicks, network responses) via an event loop. Async/await allows non‑blocking code that reads like synchronous code.

async function fetchData() {
    let response = await fetch(url);
    let data = await response.json();
    console.log(data);
}

3.1.5. Role in Web Ecosystems — Client vs Server

On the client side (browser), JavaScript manipulates the DOM, handles user events, and makes network requests. On the server side, Node.js, Deno, Bun (JavaScript), Python (Django, Flask), PHP, and Ruby (Rails) handle HTTP requests, databases, and business logic.

3.1.6. Package Managers — npm, pip, composer, bundler

Package managers automate the installation, updating, and versioning of third‑party libraries.

EcosystemPackage Manager
JavaScript/TypeScriptnpm, yarn, pnpm
Pythonpip, poetry
PHPcomposer
Rubybundler

3.1.7. Runtime Environments — Browser, Node.js, Deno, Bun

The runtime environment provides APIs beyond the core language (e.g., file system, network, DOM).

  • Browser – DOM, Web APIs (Fetch, Canvas, WebAssembly). Engines: V8 (Chrome), SpiderMonkey (Firefox), JavaScriptCore (Safari).
  • Node.js – Server‑side runtime with npm, file system, TCP/UDP.
  • Deno – Secure runtime with native TypeScript support, permission‑based access.
  • Bun – Fast all‑in‑one runtime, bundler, package manager, test runner.

3.2. JavaScript (Multi‑Paradigm — Interpreted/JIT) — Web, Mobile & Desktop

JavaScript is the only language natively supported by web browsers. It is dynamically typed, prototype‑based, and multi‑paradigm (procedural, OOP, functional). Modern JavaScript (ES6+) includes classes, modules, arrow functions, promises, and async/await.

const greet = (name) => `Hello, ${name}!`;
console.log(greet("World"));

3.2.1. Frontend JavaScript — Libraries & Frameworks

3.2.1.1. React JS (Library) — UI Components

React is a component‑based library for building user interfaces using a virtual DOM and JSX (JavaScript XML).

function Button({ onClick, children }) {
    return <button onClick={onClick}>{children}</button>;
}
3.2.1.1.1. Next.js (Framework) — SSR & SSG

Next.js adds server‑side rendering, static site generation, API routes, and file‑based routing to React.

3.2.1.1.2. Redux (Library) — State Management

Redux provides a single immutable state tree and pure reducers for predictable state management in large React apps.

3.2.1.1.3. Vite (Tool) — Dev Server & Build

Vite is a next‑generation build tool with instant hot module replacement using native ES modules.

3.2.1.2. Angular (Framework) — Enterprise Frontend

Angular is a full‑featured, opinionated framework built with TypeScript. It includes dependency injection, two‑way data binding, and RxJS.

import { Component } from '@angular/core';
@Component({ selector: 'app-root', template: '<h1>Hello</h1>' })
export class AppComponent {}
3.2.1.2.1. TypeScript (Superset) — Typed JS

TypeScript adds static typing, interfaces, generics, and other features to JavaScript, compiling to plain JS.

3.2.1.2.2. RxJS (Library) — Reactive Programming

RxJS is a library for reactive programming using Observables, deeply integrated into Angular.

3.2.1.3. Vue.js (Framework) — Progressive UI

Vue.js is a progressive framework that can be adopted incrementally. It features a reactivity system, single‑file components, and two‑way data binding.

<template><h1>{{ msg }}</h1></template>
<script>export default { data() { return { msg: 'Hello Vue!' } } }</script>
3.2.1.3.1. Nuxt.js (Framework) — SSR & SSG

Nuxt.js is a full‑stack framework for Vue, providing server‑side rendering, static site generation, and file‑based routing.

3.2.1.3.2. Pinia (Library) — State Management

Pinia is the official Vue state management library (replacing Vuex), with TypeScript support.

3.2.1.3.3. Vuex (Library) — Legacy State

Vuex is the previous official state management library for Vue (legacy).

3.2.1.4. Svelte (Compiler‑Based Framework) — Lightweight UI

Svelte compiles components at build time into vanilla JavaScript, eliminating the need for a runtime virtual DOM.

<script> let count = 0; </script>
<button on:click={() => count++}>{count}</button>
3.2.1.4.1. SvelteKit (Framework) — Full‑Stack

SvelteKit is the official full‑stack framework for Svelte, providing routing, SSR, and SSG.

3.2.1.5. React Native (Framework) — Cross‑Platform Mobile

React Native allows building native mobile apps for iOS and Android using React. It renders actual native UI components, not web views.

3.2.1.6. Ionic (Framework) — Hybrid Mobile

Ionic builds cross‑platform mobile apps using web technologies (HTML, CSS, JS) running in a native WebView. It works with Angular, React, or Vue.

3.2.1.7. NativeScript (Framework) — Native Mobile

NativeScript builds truly native mobile apps with JavaScript, TypeScript, or Angular, accessing native iOS/Android APIs directly.

3.2.1.8. Electron.js (Framework) — Cross‑Platform Desktop

Electron combines Chromium and Node.js to build cross‑platform desktop apps using web technologies (VS Code, Slack, Discord are built with Electron).

3.2.1.9. WebAssembly (WASM) — Performance in Browser

WebAssembly is a binary instruction format that runs in browsers at near‑native speed. It is a compilation target for C, C++, Rust, Go, and other languages, enabling high‑performance web applications.

3.2.2. Backend JavaScript — Libraries & Frameworks

3.2.2.1. Node.js (Runtime) — Server‑Side JavaScript

Node.js is a JavaScript runtime built on V8 with non‑blocking, event‑driven I/O. It is excellent for high‑concurrency I/O‑bound applications.

const http = require('http');
http.createServer((req, res) => res.end('Hello')).listen(3000);
3.2.2.1.1. Express.js (Framework) — Web & API

Express.js is the minimal, unopinionated web framework for Node.js, providing routing and middleware.

3.2.2.1.2. Koa (Framework) — Lightweight API

Koa is a smaller, more expressive framework built by the Express team, using async/await.

3.2.2.1.3. NestJS (Framework) — Enterprise API

NestJS is an opinionated framework inspired by Angular, using TypeScript, dependency injection, and decorators.

3.2.2.1.4. Socket.IO (Library) — Real‑Time

Socket.IO enables real‑time, bidirectional event‑based communication between client and server using WebSockets.

3.2.2.2. Fastify (Framework) — High Performance API

Fastify is a high‑performance web framework with built‑in schema‑based validation and very low overhead.

3.2.2.3. Deno (Runtime) — Secure Server

Deno is a secure runtime for JavaScript and TypeScript, created by the original Node.js author. It has native TypeScript support, explicit permissions, and a standard library.

3.2.2.4. Bun (Runtime) — Fast Runtime & Bundler

Bun is an all‑in‑one JavaScript runtime, bundler, package manager, and test runner, designed for speed.

3.2.3. Full‑Stack JavaScript Development — Web Apps

Full‑stack JavaScript uses the same language on frontend and backend. Popular frameworks include:

  • Next.js (React) – full‑stack with SSR, SSG, API routes.
  • Nuxt.js (Vue) – full‑stack for Vue.
  • SvelteKit – full‑stack for Svelte.
  • Remix (React) – full‑stack with nested routes and progressive enhancement.
  • Astro – content‑driven framework that ships zero JavaScript by default.

3.3. Python — The Friendly Language

Python was created by Guido van Rossum in 1991. It emphasises code readability (using indentation to define blocks) and has a huge standard library. Python is dynamically typed, interpreted, and multi‑paradigm. It is the dominant language in data science, AI, machine learning, and scientific computing.

name = input("Name: ")
print(f"Hello {name}")

3.3.1. Django (Framework) — Web & API

Django is a high‑level, “batteries‑included” web framework with an ORM, admin interface, authentication, and built‑in security.

3.3.1.1. Django REST Framework (API)

Django REST Framework (DRF) is a powerful toolkit for building RESTful APIs on top of Django.

3.3.1.2. Celery (Task Queue)

Celery is a distributed task queue for handling background jobs (e.g., sending emails, processing images).

3.3.2. Flask (Micro‑Framework) — Lightweight Web & API

Flask is a lightweight, minimal web framework. It gives you only routing and request handling; you choose other components (database, forms, etc.).

from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello(): return "Hello"

3.3.3. FastAPI (Framework) — High Performance API

FastAPI is a modern, high‑performance framework for building APIs with Python type hints. It is one of the fastest Python frameworks, thanks to Starlette and Pydantic.

3.3.4. pip / Poetry (Package Managers)

pip is the default package installer for Python. Poetry is a modern dependency management and packaging tool that handles virtual environments and lock files.

3.3.5. NumPy / Pandas (Data Libraries)

NumPy provides N‑dimensional arrays and fast mathematical functions. Pandas provides DataFrame structures for data manipulation and analysis. Both are foundational for data science.

3.3.6. TensorFlow / PyTorch (AI & ML)

TensorFlow (Google) and PyTorch (Meta) are the leading deep learning frameworks. They are used for building and training neural networks for computer vision, NLP, generative AI, etc.

3.4. Ruby — The Happy Language

Ruby was created by Yukihiro Matsumoto in 1995. It is designed to make programming enjoyable and productive. Everything in Ruby is an object. Ruby is dynamically typed, interpreted, and focuses on developer happiness.

5.times { puts "Hello" }

3.4.1. Ruby on Rails (Framework) — Full‑Stack Web

Ruby on Rails is a full‑stack web framework that popularised “convention over configuration” and MVC architecture.

3.4.1.1. Active Record (ORM)

Active Record is Rails’ ORM that maps database tables to Ruby objects.

3.4.1.2. Action Cable (WebSockets)

Action Cable integrates WebSockets into Rails, enabling real‑time features.

3.4.2. Sinatra (Micro‑Framework) — Lightweight Web

Sinatra is a minimal web framework for Ruby, suitable for small APIs and lightweight applications.

3.4.3. Bundler / RubyGems (Package Manager)

Bundler manages gem dependencies; RubyGems is the package manager.

3.5. PHP — The Web Server Language

PHP (Hypertext Preprocessor) was created by Rasmus Lerdorf in 1994. It is a server‑side scripting language embedded in HTML. PHP powers ~77% of websites, including WordPress (43% of all websites).

<?php echo "Hello"; ?>

3.5.1. Laravel (Framework) — Web & API

Laravel is the most popular PHP framework, providing an elegant syntax for routing, Eloquent ORM, Blade templating, and built‑in authentication.

3.5.1.1. Livewire (Library) — Reactive UI

Livewire allows building dynamic UI components without writing JavaScript.

3.5.1.2. Sanctum / Passport (Auth)

Sanctum and Passport are Laravel packages for API authentication.

3.5.2. WordPress (CMS) — Web & Blogging

WordPress is a content management system and blogging platform built on PHP. It has a huge ecosystem of plugins and themes.

3.5.3. Magento (Framework) — E‑Commerce

Magento (now Adobe Commerce) is a feature‑rich e‑commerce platform for enterprise‑scale online stores.

3.5.4. Symfony (Framework) — Enterprise Web

Symfony is a set of reusable PHP components and a framework for large‑scale enterprise applications.

3.5.5. Composer (Package Manager)

Composer is the dependency manager for PHP.

3.6. Bash — The Linux Automation Language

Bash (Bourne Again SHell) is the default shell on most Linux distributions and macOS. It is used for scripting system administration tasks, automation, and command‑line utilities.

#!/bin/bash
for file in *.txt; do
    echo "Processing $file"
done

3.7. PowerShell — The Windows Automation Language

PowerShell is a task automation and configuration management framework from Microsoft. It uses commands that return .NET objects (not plain text), making it powerful for Windows administration.

Get-Process | Where-Object { $_.CPU -gt 10 }

3.8. Lua — The Tiny Embeddable Language

Lua is a lightweight, fast, embeddable scripting language. Its entire runtime is under 200KB. Used in Roblox, World of Warcraft addons, Nginx, Redis scripting, and Neovim.

local player = { name = "Alice", health = 100 }
function player:takeDamage(amount)
    self.health = self.health - amount
end

3.9. Perl — Scripting & Text Processing

Perl (Practical Extraction and Report Language) was created by Larry Wall in 1987. It is renowned for its powerful regular expression engine and text processing capabilities.

my $text = "Hello world";
$text =~ s/world/Perl/;
print $text;

3.9.1. CPAN (Package Repository)

CPAN is the Comprehensive Perl Archive Network, one of the oldest and largest package repositories.

3.9.2. Mojolicious (Web Framework)

Mojolicious is a modern, real‑time web framework for Perl.

3.9.3. Text Processing & Regex Engine

Perl’s regex engine is built into the language syntax, making it extremely powerful for data extraction, log parsing, and report generation.

3.9.4. Legacy Web & Bioinformatics

Perl was the dominant language for CGI web programming in the 1990s and is still used in bioinformatics (BioPerl).

4. Domain‑Specific Languages (high‑level) — Special Purpose | Data, Query, Config & Markup

4.1. Foundations

4.1.1. What is a Domain‑Specific Language?

A Domain‑Specific Language (DSL) is a language specialised for a particular domain, problem type, or application area. It sacrifices generality for expressiveness within that domain.

Example: SQL is a DSL for relational database queries. Writing SELECT name FROM users is concise and directly expresses the domain concept.

4.1.2. DSL vs General Purpose Language

DSLGeneral Purpose Language (GPL)
Narrow scopeWide scope
Highly concise for its domainMore verbose
Example: SQL, HTML, RegexExample: Python, Java, C++

4.1.3. Internal vs External DSL

  • Internal DSL – embedded in a host GPL (e.g., Rails routes are Ruby code).
  • External DSL – standalone with its own parser (e.g., SQL, YAML).

4.1.4. Declarative Nature of DSLs

Most DSLs are declarative – you specify what you want, not how to do it. The underlying engine handles the implementation details.

4.1.5. Where & Why DSLs Are Used

DSLs are used for configuration, queries, markup, data serialisation, build automation, hardware design, and scientific computing.

4.2. Markup Languages — Structure & Presentation

4.2.1. HTML (Markup) — Web Structure

HTML (HyperText Markup Language) is the standard markup language for web pages. It describes the structure and semantic meaning of content using elements enclosed in tags.

<h1>Title</h1>
<p>Paragraph</p>
4.2.1.1. HTML5 Semantics & Accessibility

HTML5 introduced semantic elements (<header>, <nav>, <article>, <section>, <footer>) that improve accessibility and SEO.

4.2.1.2. Forms, Media & Embedding

HTML provides <form>, <input>, <video>, <audio>, and <canvas> for interactive and multimedia content.

4.2.1.3. Web Components

Web Components (Custom Elements, Shadow DOM, HTML Templates) allow creating reusable custom elements with encapsulated styles and behaviour.

4.2.1.4. Canvas & SVG

Canvas provides a 2D drawing API, while SVG is used for vector graphics.

4.2.2. XML (Markup) — Data & Config Structure

XML (Extensible Markup Language) is a general‑purpose markup language for encoding structured data in a human‑readable and machine‑parseable format.

<person><name>Alice</name></person>
4.2.2.1. XPath (Query)

XPath is a query language for selecting nodes from an XML document.

4.2.2.2. XSLT (Transformation)

XSLT transforms XML into other formats (HTML, text, or other XML).

4.2.2.3. XML Schema / DTD (Validation)

XML Schema and DTD define the structure and data types of XML documents.

4.2.3. Markdown — Docs & Content

Markdown is a lightweight markup language with plain‑text formatting syntax that converts to HTML. Used in README files, documentation, and note‑taking apps.

# Heading
**bold** and *italic*
- list

4.2.4. LaTeX — Academic & Scientific Publishing

LaTeX is a typesetting system based on TeX. It is the standard for academic papers, theses, and books in mathematics, physics, and computer science.

\documentclass{article}
\begin{document}
Hello, \LaTeX!
\end{document}

4.2.5. reStructuredText — Python Docs & Technical Writing

reStructuredText is a lightweight markup language used by Python documentation and the Sphinx documentation generator.

4.3. Query Languages — Data Retrieval & Management

4.3.1. SQL (Relational) — Database Queries

SQL (Structured Query Language) is the standard language for relational databases. It is declarative – you specify what data to retrieve, not how.

SELECT name FROM users WHERE age > 18;
4.3.1.1. MySQL / PostgreSQL / SQLite

Popular SQL database implementations: MySQL (web), PostgreSQL (enterprise), SQLite (embedded).

4.3.1.2. Joins, Indexes, Transactions
  • Joins combine data from multiple tables.
  • Indexes speed up queries.
  • Transactions ensure ACID properties (Atomicity, Consistency, Isolation, Durability).
4.3.1.3. Stored Procedures & Views

Stored procedures are pre‑compiled SQL code. Views are virtual tables based on queries.

4.3.2. GraphQL (API Query Language) — Flexible Data Fetching

GraphQL is a query language for APIs developed by Meta. It allows clients to request exactly the data they need in a single request.

{ user(id: "1") { name } }
4.3.2.1. Apollo (Client & Server)

Apollo is the leading GraphQL implementation for client and server.

4.3.2.2. Hasura (Auto GraphQL API)

Hasura automatically generates a GraphQL API from a PostgreSQL database.

4.3.3. SPARQL (Semantic) — Linked Data & RDF Queries

SPARQL is the query language for RDF (Resource Description Framework) data, used in knowledge graphs and semantic web applications.

SELECT ?name WHERE { ?person foaf:name ?name . }

4.3.4. XQuery (XML) — XML Data Querying

XQuery is a functional language for querying, extracting, and transforming data from XML documents.

4.4. Data & Config Languages

4.4.1. JSON — Data Interchange & APIs

JSON (JavaScript Object Notation) is a lightweight text‑based data format, the de facto standard for web APIs.

{"name": "Alice", "age": 30}

4.4.2. YAML — Config & DevOps Automation

YAML uses indentation for structure and supports comments. It is the dominant format for Kubernetes, Docker Compose, GitHub Actions, and Ansible.

name: Alice
age: 30

4.4.3. TOML — Config Files (Rust, Python)

TOML (Tom’s Obvious, Minimal Language) is used in Rust’s Cargo.toml and Python’s pyproject.toml.

name = "Alice"
age = 30

4.4.4. CSV / TSV — Tabular Data Exchange

CSV (Comma‑Separated Values) and TSV (Tab‑Separated Values) are simple formats for tabular data.

name,age
Alice,30

4.4.5. HCL (HashiCorp) — Terraform & Infrastructure as Code

HCL (HashiCorp Configuration Language) is used by Terraform to declare infrastructure resources.

resource "aws_instance" "web" {
    ami = "ami-123"
    instance_type = "t2.micro"
}

4.4.6. Dockerfile — Container Definition

A Dockerfile is a text file with instructions for building a Docker container image.

FROM alpine
COPY . /app

4.4.7. Kubernetes YAML — Orchestration Config

Kubernetes uses YAML manifests to declare the desired state of cluster resources (Pods, Deployments, Services).

apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - name: nginx
    image: nginx

4.4.8. .env / INI — Environment & App Config

.env files store environment variables as key‑value pairs. INI files are legacy configuration files with sections.

DATABASE_URL=postgres://user:pass@localhost/db

4.5. Statistical & Scientific Computing

4.5.1. R (Functional) — Statistical Computing & Visualization

R is a language and environment for statistical computing and graphics. It is widely used in academia, biostatistics, and data science.

data <- c(1,2,3)
mean(data)
4.5.1.1. ggplot2 (Visualization)

ggplot2 is a declarative graphics library based on the Grammar of Graphics.

4.5.1.2. tidyverse (Data Wrangling)

tidyverse is a collection of R packages (dplyr, tidyr, ggplot2, etc.) for data manipulation and visualisation.

4.5.1.3. Shiny (Web Apps)

Shiny allows building interactive web applications directly from R.

4.5.1.4. RStudio (IDE)

RStudio is the integrated development environment for R.

4.5.2. MATLAB (Matrix) — Scientific & Engineering

MATLAB is a proprietary numerical computing environment where the matrix is the fundamental data type. Used heavily in engineering, physics, and signal processing.

A = [1 2; 3 4];
inv(A)

Simulink is a graphical environment for modelling and simulating dynamic systems.

4.5.2.2. Signal & Image Processing Toolboxes

Domain‑specific toolboxes for specialised engineering tasks.

4.5.2.3. Control Systems Toolbox

For analysis and design of control systems.

4.5.3. Julia (High‑Performance) — Scientific Computing

Julia is a high‑level, high‑performance language for technical computing. It uses JIT compilation to achieve C‑like speed.

function greet()
    println("Hello")
end
4.5.3.1. Flux.jl (ML)

Flux.jl is a machine learning library for Julia.

4.5.3.2. Plots.jl (Visualization)

Plots.jl is a powerful plotting library.

4.6. Hardware Description Languages

4.6.1. VHDL — Digital Circuit Design

VHDL (VHSIC Hardware Description Language) is used to describe the behaviour and structure of electronic circuits, especially for FPGAs and ASICs.

4.6.2. Verilog — Hardware Description

Verilog is a hardware description language with C‑like syntax, widely used in the semiconductor industry.

4.6.3. SystemC — System‑Level Modeling

SystemC is a set of C++ classes for modelling hardware at a higher level of abstraction (system‑level, architectural exploration).

4.7. Shader & Graphics Languages

4.7.1. GLSL — OpenGL Shading Language

GLSL is used to write shaders (vertex, fragment, compute) for OpenGL and Vulkan.

#version 330 core
out vec4 FragColor;
void main() { FragColor = vec4(1.0,0.5,0.2,1.0); }

4.7.2. HLSL — DirectX Shading Language

HLSL is Microsoft’s shader language for DirectX (Windows, Xbox).

4.7.3. WGSL — WebGPU Shading Language

WGSL is the shader language for WebGPU, the modern browser GPU API.

4.8. Build, Automation & Pattern DSLs

4.8.1. Makefile — Build Automation

Make is a build automation tool that uses Makefiles to describe dependencies and build rules.

hello: hello.c
    gcc -o hello hello.c

4.8.2. Gradle DSL — Build Scripts (Java/Kotlin)

Gradle uses a Groovy or Kotlin DSL to define builds. It is the standard for Android and many JVM projects.

plugins { java }
repositories { mavenCentral() }
dependencies { testImplementation("junit:junit:4.13.2") }

4.8.3. Ansible YAML — IT Automation

Ansible uses YAML playbooks to describe configuration management and orchestration tasks.

- name: Install nginx
  apt:
    name: nginx
    state: present

4.8.4. Regex (Regular Expressions) — Pattern Matching & Text Processing

Regular expressions are a DSL for pattern matching in text. They are embedded in many languages (Perl, Python, JavaScript, grep, sed).

^\d{3}-\d{2}-\d{4}$

4.8.5. Shell / Bash (Scripting) — System Automation

Shell scripting (especially Bash) is the fundamental automation language for Unix‑like systems. It combines command invocation with variables, conditionals, and loops.

#!/bin/bash
echo "Hello, Bash!"

5. Putting It All Together

5.1. Procedural vs OOP vs Functional — When to Use Each

SituationBest Paradigm
Small script, automationProcedural
Modelling real‑world entitiesOOP
Data transformation pipelineFunctional
Concurrent / distributed systemsFunctional
GUI / game developmentOOP
Systems programming (OS, drivers)Procedural + OOP

5.2. Multi‑Paradigm Languages

Most modern languages support several paradigms:

  • Python – procedural, OOP, functional.
  • JavaScript – procedural, OOP (prototype), functional.
  • Kotlin – OOP, functional.
  • Swift – OOP, functional.
  • Scala – OOP + functional.

5.3. Language Selection Guide

GoalRecommended Languages
BeginnerPython
Web frontendJavaScript/TypeScript
Web backendNode.js, Python, Go, Java, PHP, Ruby
iOS appSwift
Android appKotlin
Data science / AIPython
Systems / performanceRust, C++
Cloud / DevOpsGo
Game developmentC++ (engine), C# (Unity), Lua (scripts)
Enterprise backendsJava, C#, Kotlin

Scroll to Top