HackerTubewatch
Surprise me
Frame from Edward Kmett - Type Classes vs. the World Plays via YouTube's privacy-enhanced embed

Edward Kmett - Type Classes vs. the World

Boston Haskell
Talks
YouTube
2 HN users recommended this talk2 months2015–2024 score 2.5
Years with an HN recommendation, 2007–2026

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.

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.

“Ed Kmett's fantastic "Typeclasses v. the World" talk covers” (HN, 2015)

1 strong recommendations · 1 recommendations · 4 citations · Talks · advanced

6 Hacker News comments

From the HN archive; up to 20 kept per video, favoring different commenters. Recommendations first.

@shadytrees Sep 2015 Strongly recommends
on HN thread Haskell's Type Classes: We Can Do Better
Read more
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: [this video] Global uniqueness of instances (which GHC does NOT enforce) is bad for modular programming, or programming at large, which is a point some of the commenters here are making. [link] The submitted HN link here has a terrible title. What the author is proposing is enforcing typeclass laws, which is a great idea (but difficult in practice to implement). Practice and time has shown that lawless classes are the ones that people hate, the ones that don't add any benefit and in fact make it harder to reason about large Haskell programs. I hope people don't take away from this link that classes in Haskell are bad. Haskell is three things: pure, functional, and typeclasses. They're part of the identity of Haskell; they're the reason we set off on this wonderful journey into the uncharted oceans of functional programming back in 1990. Typeclasses are AWESOME. And they can be improved. Postscript: Kmett also has a package that persuades the compiler to let you have dynamically generates instances. It has the same user experience as local implicits, which I think a lot of people here are asking for: [link] λ> using (Monoid (+) 0) $ mappend mempty 12 12 GHC
Kmett explains benefits of global coherence for refactoring and reasoning.
@Twey Aug 2023 Recommends
on HN thread This isn’t the way to speed up Rust compile times
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]: [this video]
Explains why alternatives to the orphan rule hurt reasoning.

Citations, criticism and jokes

@ablesearcher Nov 2015 Cites it
on HN thread Making Elm faster and friendlier in 0.16
Read more
I've seen Evan's talk. Evan confuses the presentation of features with the value of those features. (I suppose one could solve the difficulties people have in learning Mathematics by throwing out everything after Algebra I; another solution, however, might be to do a better job teaching the more difficult stuff.) Just because you shouldn't expose new programmers to advanced concepts on the first day doesn't mean they shouldn't be a part of the language. Similarly, the fact (<~) might confuse someone new to Elm isn't a reason for removing it from the language. I'm sympathetic to the concern that some code is too "clever" or dense; but Elm swings the pendulum too far. (Btw, type-classes are not incidental complexity: [link] [this video] )
Cited to argue type classes are not incidental complexity.
@lomnakkus Apr 2016 Cites it
on HN thread An OCaml manifesto – Problems and what's needed for widespread adoption
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] [this video] . (Sorry for throwing video at you -- there's probably a write-up somewhere, but I'm in a bit of a rush, and this was the thing that came to mind.)
Explains why global uniqueness matters for higher-level code.
@themk Nov 2024 Cites it
on HN thread Traits are a local maximum
It's been a while now, but I believe Ed Kmett covers some of this in his talk "Typeclasses vs The World" [this video]
Kmett talk believed to cover the topic.

Video list and Hacker News comment labels from HackerTube (prompted by @karpathy), released under ODC-By 1.0, built on the open-index/hacker-news archive. Hacker News data is provided by Y Combinator; comments remain the work of their authors. Video titles, channel names and thumbnails belong to their creators and are shown via YouTube. HackerTube Watch is an unofficial edition. Data export of 2026-10-31.

Keyboard shortcuts

/
Search
j k
Next / previous video
r
Surprise me
l
Like (video page)
w
Watch later (video page)
?
This help
Esc
Close