A Very Early History of Algebraic Data Types
Posted3 months agoActive3 months ago
hillelwayne.comTechstory
calmpositive
Debate
10/100
Programming LanguagesAlgebraic Data TypesType Theory
Key topics
Programming Languages
Algebraic Data Types
Type Theory
The article explores the early history of algebraic data types (ADTs) in programming languages, sparking a discussion on the evolution and influence of ADTs.
Snapshot generated from the HN discussion
Discussion Activity
Light discussionFirst comment
7m
Peak period
1
0-1h
Avg / period
1
Key moments
- 01Story posted
Sep 25, 2025 at 9:08 PM EDT
3 months ago
Step 01 - 02First comment
Sep 25, 2025 at 9:14 PM EDT
7m after posting
Step 02 - 03Peak activity
1 comments in 0-1h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 26, 2025 at 10:28 AM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45381379Type: storyLast synced: 11/17/2025, 1:15:40 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
This claim always bugs me. “Sun types” have been a common idiom under different names since at least the 1970’s, and are supported by every major language in common use. Just not usually at the language / compiler level.
> Niklaus Wirth uses “discriminated union” why Pascal doesn’t have sum types.
In the referenced paper (Wirth, 1975, An assessment of the programming language PASCAL, ACM), Wirth refers to the "inspect when" statement of Simula 67, which is structurally identical to type discrimination with (exhaustive) pattern matching; so Simula essentially already had something like "sum types" (unified with inheritance). Wirth implemented the same concept in his later Oberon language (which also supports inheritance and offers a WITH statement similar to Simula's "inspect when"). Also Pascal variant records are similar to sum types (even if Wirth didn't use this term); variant records have an explicit tag field, though Pascal doesn't enforce tag nor exhaustiveness checking. Wirth improved this in Oberon, which can be used to meet both key guarantess of sum types.