How each programming language thinks

How each programming language thinks

Javascript

  • one worker doing tasks one at a time (single-threaded)
  • when waiting (network, timer), the worker moves to the next task instead of standing still (async, setTimeout, Promise; non-blocking with the event loop puppeteer)
  • computer cleans up stuff automatically (garbage collection)
  • very flexible, checks mistakes when running (dynamic typing, runtime checks)
  • think “waiter juggling multiple tables” (concurrency model)

Python

  • one worker, mostly waits for each task to finish (single-threaded with GIL, mostly synchronous)
  • computer cleans up stuff automatically (garbage collection)
  • easy to read, slower than others (interpreted)
  • very flexible, checks mistakes when running (dynamic typing)
  • think “friendly helper, takes its time”

Rust

  • multiple workers can work safely at the same time (multi-threaded, memory safe)
  • you decide when to throw stuff away (compiler helps) (manual memory management with with ownership/borrow checkers)
  • very fast, checks mistakes before running (compiled, static analysis)
  • strict rules, but prevents bugs (strong type system, borrow checker)
  • think “strict teacher who prevents you from making messes”

Solidity

  • does one thing completely, no interruptions (atomic transactions, single-threaded)
  • every operation costs money (gas)
  • can’t trust anyone, everyone might cheat (adversarial environment)
  • think “bank vault- slow, expensive, paranoid”

SAS

  • one worker processes data step-by-step (procedural, mostly single-threaded)
  • built for analyzing and reporting structured data (statistical + tabular focus)
  • syntax is strict and old-school (less flexible, more verbose)
  • checks everything before running (compiled data steps, strong validation)
  • great for regulated industries (audit trails, reproducibility)
  • think “old accountant- slow, careful, precise, and always balanced”