The Algebra of Algebraic Data Types

Channel:London Haskell · Length:1:04:35 · Published:2012-12-24 · Views:27500

Watch on YouTube

Summary

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.

Why HN 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.

Real types are numbers that obey type algebra, which C/Java/Go have no idea exists. — HN, 2015

Programming language design · Functional programming

Subtitles (excerpt)

[Applause] um so first thanks to Derek and Bill for inviting me to talk here um based on knowing almost nothing about me which is very brave of them um I've got to confess that this talk isn't really about Haskell um it's sort of incidentally about hll so all of the code is going to be in Haskell uh and that's mainly because I know hll and most of you guys hcal but really the same talk could be done with all the code in ml or it could be done in Scala instead any language that has altic data types because really this is just a talk about types so um on the you know the scale from Super theoretical to Super practical it's kind of more towards the theoretical end um but hopefully it'll be pretty interesting so uh I started learning hasal about a year ago pretty much dead on a year ago uh when I was working for an investment Bank writing Java all the time uh and had just come out of studying Maths for eight years and wanted something that was going to exercise the math part of my brain rather than the writing Java part of my brain a bit uh so picked up learn your haskal uh and picked up real world hasal and read those and thought hey this language is pretty awesome uh and then started going on stack Overflow and reading blogs and

On Hacker News

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: [VIDEO] — innguest, 2015-04
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 th… — crntaylor, 2013-06
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 lear… — nbouscal, 2013-05
"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: [VIDEO] ) — crntaylor, 2013-02

Related videos