The Algebra of Algebraic Data Types

London Haskell · 27K views · 2012 · 1:04:35

Open on YouTube

Functional programmingProgramming language designtalk

Why Hacker News recommends it

Cited as the author's own talk and a way to go deeper on type algebra, with a note that the audio is rough at the start.

What it is

A London Haskell talk on the algebra of algebraic data types, showing how sum and product types behave like arithmetic. It frames types as numbers obeying algebraic laws.

Recommended by 0 HN commenters across 0 different months, 2013 to 2015.

What Hacker News said

Cites crntaylor · 2013-02 · on “The Algebra of Algebraic Data Types”

"This guy who is discovering it by himself" is me (the OP) about a year ago! Derivatives of types to come in part II or III (or just watch the talk on YouTube: [this video] )

Cites nbouscal · 2013-05 · on “Learn You a Haskell for Great Good”

There are two very different types of arguments typically made as to why to learn the more esoteric languages (Haskell, Lisp, Forth, others). The first is the more common: learning these languages exposes you to other ways of programming, which in turn makes you a better programmer no matter what language you're programming in. This is unquestionably true. Mainstream languages are constantly learning new things from these languages, which means you will be able to apply the techniques you learn from them to your code no matter what language you write in. I have the misfortune[1] of writing a lot of PHP at my day job, but it turns out even PHP has support for filter and map over arrays. If I

Cites crntaylor · 2013-06 · on “The Algebra of Algebraic Data Types”

Author of the blog post here. It's amusing to see this submitted by Don Stewart, since it was his explanation[0] of algebraic data types that first made them "click" for me! I think I forgot to mention him in this post, but I remembered in the talk[1]. If anyone's interested in this and where else it might go, I recommend read Don's SO answer[0], this SO question and the related answers[2] and these papers [3,4] on derivatives and dissections by Conor McBride. There are also several good blog posts[5] and a paper[6] by Brent Yorgey on the topic of combinatorial species, and of course Dan Piponi's blog[7] is a treasure trove of interesting insights at the intersection of math, physics and com

Cites innguest · 2015-04 · on “A Rust Contributor Tries Their Hand at Go”

I very much agree with you. A zip code is a string even though it looks like a number. Likewise C/Java/Go "types" are tags even though they look like types. Real types are numbers that obey type algebra, which C/Java/Go have no idea exists. The Algebra of Algebraic Data Types: [this video]