The VikiD Truth

Knowledge base / Computing

Computer Languages Centre

Here is the truth about computer languages: they are not competing religions – they are tools shaped by different bets about what matters. Syntax is the paint; the bets (typing, memory, evaluation order, metaprogramming) are the structure.

What it is, in plain words

A programming language is a notation for expressing computation that a machine can carry out. Languages differ along a handful of axes:

AxisOptionsExamples
Typingstatic / dynamic / gradualRust / Python / TypeScript
Evaluationstrict / lazyC, JS / Haskell
Memorymanual / GC / ownershipC, Zig / Java, Go / Rust
Paradigmimperative, FP, OO, logic, concatenativeC, Haskell, Smalltalk, Prolog, Forth
Levelclose to metal ↔ close to problemAssembly ↔ SQL, HTML

“Level” is a spectrum, not a moral hierarchy. Assembly and PicoLisp can both be the right answer.

Why it matters

Picking a language is picking the default costs you’ll pay and the default bugs you’ll avoid. C lets you touch every byte and cut yourself. Haskell makes effects visible and makes you think. Python optimises for time-to-first-result. Knowing a few languages from different corners of the map makes you better in all of them – patterns transfer.

An everyday analogy: vehicles

A bicycle, a lorry and a sailboat all move things. You wouldn’t haul freight on a bike or commute by freighter. Languages are vehicles. Learn to drive more than one class and the road makes sense.

flowchart TB
  Asm[Assembly] --> C[C / Zig / Odin]
  C --> Sys[Rust]
  C --> Script[Python / JS]
  Lisp[Lisp family] --> Pil[PicoLisp]
  Lisp --> CL[Common Lisp / Scheme]
  FP[Haskell / PureScript] --> Script
  Smalltalk[Smalltalk / Pharo] --> Script

A hands-on tour of the same idea

Print the sum of squares of even numbers up to 10:

/* C */
int s = 0; for (int i = 1; i <= 10; i++) if (i % 2 == 0) s += i * i;
sum(i*i for i in range(1, 11) if i % 2 == 0)
(sum '((N) (* N N)) (filter '((N) (=0 (% N 2))) (range 1 10)))
sum [x*x | x <- [1..10], even x]

Same idea; different bets about loops, types and what “a program” looks like.

Languages on this site

A non-exhaustive map of pages worth visiting:

How to choose for a new project

Ask, in order: what must I talk to (C ABI, browser, GPU)? what failure modes can I not afford (memory bugs, races)? who will maintain this in three years? how fast do I need the first prototype? The answers usually converge on two candidates; write a day of code in each and feel which one fights you less. Fashion and HN front pages are weak signals compared to that experiment.

Common misconceptions

Connections

Simply Array Arithmetic Rubinius Julia Main Site Intro to Julia (Deep) Meteor Vale Lang

Error Handling

Error Handling is just code that checks certain values and conditions before proceeding down the normal path of execution. If the code notices an ’error’ then a different path of execution is followed.

Last edited · 14 revisions

Tags: #Computing