Choosing a Programming Language

Languages are trade-offs, not badges. How to compare JavaScript/TypeScript, Python, Go and Rust by runtime, typing, concurrency and team fit, plus the learning path that works for any of them.

Beginner⏱ 5 min readLesson 1 of 13#languages#javascript#typescript#python#go#rust

The big idea

A programming language is a toolbox. A carpenter doesn't ask "which tool is the best?"; they ask "what am I building, who is helping me, and what is already on site?"

  • A multi-tool (JavaScript/TypeScript) does a bit of everything and works both in the browser and on the server.
  • A friendly power drill (Python) is easy to pick up and has an attachment for every job, especially data and AI.
  • A nail gun (Go) does one job, network services, very fast and with almost no setup.
  • A precision lathe (Rust) makes perfect parts, but you need training before you touch it.

Four languages, four tools: what each one is best at

The questions that actually decide

Drawing diagram…

💡 The best language for a team is usually the one the team can operate at 3 a.m.: debug, profile, deploy and hire for. Raw benchmark speed is rarely the bottleneck; the database and the network usually are.

Comparing the four on what matters

TypeScript (Node.js)PythonGoRust
How it runsJIT-compiled JS on V8Interpreted (CPython)Compiled to a native binaryCompiled to a native binary
TypingStatic types, erased at runtimeDynamic, optional type hintsStatic, simpleStatic, very expressive
MemoryGarbage collectedGarbage collected (ref counting + GC)Garbage collectedOwnership, no GC
ConcurrencyEvent loop + async/awaitasyncio, threads (GIL), processesGoroutines + channelsThreads + async (Tokio), no data races
Startup / deploynode + node_modulesInterpreter + virtualenvOne static binaryOne static binary
Learning curveGentleGentlestGentleSteep
Sweet spotFull-stack web, APIs, real-timeAutomation, data, AI/ML, APIsMicroservices, CLIs, cloud toolingPerformance-critical, systems, WASM
Famous usersVS Code, Slack desktopInstagram, most ML researchDocker, KubernetesFirefox components, Cloudflare

Compiled, interpreted or JIT?

Drawing diagram…
  • Ahead-of-time languages catch more mistakes before running and start instantly.
  • Interpreted languages are fast to edit and run, but slower in tight loops.
  • JIT languages start interpreted and compile "hot" code while running, a middle ground.

Static vs dynamic typing

Static (TS, Go, Rust)Dynamic (Python, plain JS)
When type errors appearWhile compiling / in the editorWhen that line runs
Refactoring a large codebaseSafe: the compiler finds every callerRelies on tests
Speed of writing a scriptSlightly slowerFastest
DocumentationTypes are documentationNeeds docstrings / type hints

Python's type hints and TypeScript's types are both checked by a tool (mypy/pyright, tsc), not enforced by the runtime. Data from outside (HTTP bodies, files, env vars) must still be validated at runtime.

The same program in four languages

Task: sum the even numbers in a list.

// TypeScript
const sumEvens = (xs: number[]): number => xs.filter((x) => x % 2 === 0).reduce((a, b) => a + b, 0);
# Python
def sum_evens(xs: list[int]) -> int:
    return sum(x for x in xs if x % 2 == 0)
// Go
func SumEvens(xs []int) int {
	total := 0
	for _, x := range xs {
		if x%2 == 0 {
			total += x
		}
	}
	return total
}
// Rust
fn sum_evens(xs: &[i64]) -> i64 {
    xs.iter().filter(|x| *x % 2 == 0).sum()
}

Notice the personalities: Python reads like English, Go is explicit and loop-based on purpose, Rust borrows the list (&[i64]) instead of taking it, and TypeScript chains array methods.

Languages vs frameworks

A framework is a tool inside the language choice, not a replacement for learning the language.

LanguageMinimal HTTPBatteries-includedCovered in
TypeScriptExpress, FastifyNestJSNode.js & Express, NestJS
PythonFastAPI, FlaskDjangoPython Web APIs
Gonet/http, Gin(Go prefers libraries)Go Web Services with Gin
RustAxum, Actix Web(Rust prefers libraries)Rust: Types, Errors & Concurrency

A learning path that works for any language

Drawing diagram…

The best first project is a small CLI or API that reads input, validates it, stores data, handles errors and has tests. Build the same project in a second language later: you'll learn more from the differences than from any tutorial.

Key takeaways

  • Choose by team, existing code, runtime needs and operations, not by popularity or benchmarks.
  • TypeScript for full-stack web, Python for automation/data/AI, Go for network services, Rust when performance and memory safety are hard requirements.
  • Static types catch errors earlier, but runtime validation at the boundary is still required in every language.
  • Learn the language fundamentals first; a framework is much easier once you know what it's doing for you.