HN
Today

The seven programming ur-languages

This article posits that despite the proliferation of programming languages, most can be traced back to one of seven fundamental 'ur-languages' or paradigms. Understanding these foundational types, from ALGOL to Prolog, helps programmers develop deeper neural pathways and a more versatile problem-solving toolkit. It's a classic Hacker News-style deep dive into the theoretical underpinnings of a practical craft.

13
Score
1
Comments
#4
Highest Rank
14h
on Front Page
First Seen
Apr 19, 11:00 AM
Last Seen
Apr 20, 12:00 AM
Rank Over Time
1694466579121191116

The Lowdown

The author argues that while many programming languages appear distinct, they often share fundamental patterns derived from a few core 'ur-languages.' Learning new languages within the same ur-language family is easy, but crossing into a new paradigm requires significant effort and fosters new ways of thinking. This conceptual framework helps explain the underlying commonalities and differences across the vast programming landscape.

The article identifies seven such ur-languages, each with distinct characteristics, examples, and historical development:

  • ALGOL: The oldest and most common, characterized by sequences of assignments, conditionals, and loops. It forms the basis for languages like C, Java, Python, and JavaScript.
  • Lisp: Defined by prefix expressions in parentheses and a powerful macro system that allows language semantics to be redefined. Known for its historical role in AI and languages like Common Lisp and Scheme.
  • ML (Functional Languages): Focuses on functions as first-class values and type systems like Hindley-Milner. All iteration is done via recursion, exemplified by OCaml and Haskell.
  • Self (Object-Oriented Languages): Programs are systems of objects communicating via messages. Known for its pure object model, contrasting with Smalltalk's class-based approach, and influencing JavaScript.
  • Forth (Stack Languages): Operates on a data stack, using postfix notation. Noted for its extensibility, allowing programmers to redefine its grammar, as seen in PostScript.
  • APL (Array Languages): Everything is an n-dimensional array, with terse, high-level operators for array manipulation. Descendants like K are popular in financial settings.
  • Prolog (Logic Languages): Programs consist of facts and rules, with the runtime searching for query results. Its unique declarative approach has applications in niches like type checking.

The author encourages programmers to learn an ALGOL-family language well, then SQL (a Prolog-family language in practice), and subsequently explore a new ur-language each year to broaden their perspective and develop richer problem-solving capabilities, suggesting specific languages like Racket, Haskell, and K.