Edward Kmett - Type Classes vs. the World
Channel:Boston Haskell · Length:1:42:53 · Published:2015-02-16 · Views:35598
Summary
Edward Kmett speaks at the Boston Haskell meetup about type classes and the design tradeoffs of global coherence compared with other approaches to implicit instances. It covers why uniqueness of instances matters for reasoning and refactoring.
Why HN recommends it
HN points to it as the definitive explanation of why coherence and the orphan rule matter, in debates over Haskell, Rust traits, OCaml modules and Elm.
Ed Kmett's fantastic "Typeclasses v. the World" talk covers — HN, 2015
Programming language design · Functional programming
Subtitles (excerpt)
use this can people hear me now all right can people hear me now there all right that'll work so when I put together the T the title of the talk I was just trying to figure out uh what I wanted to talk about around type classes what this has been a a fight I seem to be fighting over and over again on Reddit and different media um let me make sure I actually have this thing Rec if not you and I wanted to just be able to put everything I wanted to say kind of in one place and uh we were originally going to do this I think about three months ago and I was perfectly prepared I had all of my ducks in a row I was all set to say everything that I wanted to say about type classes and then three months passed um so I think I remember almost everything I wanted to say about the topic and we'll see how it goes um I'm more than happy to throw this open to the room if folks have questions want me to drill in deeper want me to slow down explain things more um we have plenty of time we have the whole you know the couple hours here uh and we're going to do some talking about um like what we want to do for this coming year afterwards so you know we don't have to we're not going to fill two hours with with
On Hacker News
The point is a little more subtle than this, or how the article made it out to be. Global coherence and confluence (which GHC attempts to enforce unless told otherwise) is great for refactoring and equational reasoning and (yes) mathematics and programming at large, as Ed Kmett's fantastic "Typeclasses v. the World" talk covers: [VIDEO] Global uniqueness of instances (which GHC does NOT enforce) … — shadytrees, 2015-09
Edward Kmett has a great explanation[1] of the considerations around this space. It's not that alternatives to the orphan rule are hard to implement, it's that they lead to things being much harder to reason about for the programmer. [1]: [VIDEO] — Twey, 2023-08
It's been a while now, but I believe Ed Kmett covers some of this in his talk "Typeclasses vs The World" [VIDEO] — themk, 2024-11
AFAIUI modular implicits don't give you global uniqueness. While this can be "worked around" in some cases[0], it's not really possible in the general case, and global uniqueness is pretty essential for sanity when writing higher-level code[1]. [0] The paper gives set-union as an example. [1] [VIDEO] . (Sorry for throwing video at you -- there's probably a write-up somewhere, but I'm in a bit of … — lomnakkus, 2016-04
> [1] [VIDEO] Now we just need a Haskell compiler which actually bothers to provide the "pretty essential for sanity" for global uniqueness. Currently, I count zero compilers in common use which do. — airless_bar, 2016-04
Related videos
- Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich · Confreaks · 53:21
- How Python was Shaped by leaky Internals, Armin Ronacher, Flask framework · Видео с мероприятий {speach! · 49:55
- The Soul of Erlang and Elixir • Sasa Juric • GOTO 2019 · GOTO Conferences · 42:02
- "Simple Made Easy" - Rich Hickey (2011) · Strange Loop Conference · 1:01:38
- "Making Impossible States Impossible" by Richard Feldman · elm-conf · 25:06
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- The Value of Values with Rich Hickey · InfoQ · 31:43
- Why Isn't Functional Programming the Norm? – Richard Feldman · Metosin · 46:09
- Maybe Not - Rich Hickey · ClojureTV · 1:03:28
- Solving Problems the Clojure Way - Rafal Dittwald · Clojure/north · 1:02:26
- Lecture 1A: Overview and Introduction to Lisp · MIT OpenCourseWare · 1:12:55
- Conway's Game Of Life in APL · Dyalog · 7:47
- Lecture 1A | MIT 6.001 Structure and Interpretation, 1986 · MIT OpenCourseWare · 1:12:55
- Crockford on JavaScript - Volume 1: The Early Years · YUI Library · 1:42:08
- Growing a Language, by Guy Steele · Bill Pugh · 53:31
- Effective Programs - 10 Years of Clojure - Rich Hickey · ClojureTV · 1:14:51