HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Rich Hickey rants about HttpServletRequest in 1080p: Death By Specificity from Clojure Made Simple

Fred Overflow5 HN recommenders · recommended in 5 months, 2020-2026
YouTube
43K views · 6 years ago · talk · evergreen

A five-minute excerpt of Rich Hickey's Clojure Made Simple talk, with new slides, ranting about HttpServletRequest and specificity. He argues for using generic maps instead of many specific classes and getters.

Cited as the classic rant on maps versus objects in discussions of data modeling and OOP.

Software architecture & designFunctional programmingDatabases & storage#richhickey#clojure#maps#oop#datamodeling

14 comments from Hacker News

@drob5182026 · in “My thoughts after using Clojure for about a month”

> I personally find OOP to be the most intuitive for large scale systems design, but that's just me. At one point, I was the same. But after going functional in Clojure, I can’t imagine going back. Using maps nd just having common functions that transform data into different data is definitely the way to go. This is with your time: ▶ this video

RecommendsView on HN
@codemonkey-zeta2025 · in “On Having a Data Object”

Author is on the verge of having a Clojure epiphany. > 1. You should often be using different objects in different contexts. This is because "data" are just "facts" that your application has observed. Different facts are relevant in different circumstances. The User class in my application may be very similar to the User class in your application, they may even have identical "login" implementations, but neither captures the "essence" of a "User", because the set of facts one could observe about Users is unbounded, and combinatorially explosive. This holds for subsets of facts as well. Maybe our login method only cares about a User's email address and password, but to support all the other stuff in our app, we have to either: 1. Pass along every piece of data and behavior the entire app specifies 2. Create another data object that captures only the facts that login cares about (e.g. a LoginPayload object, or a LoginUser object, Credential object, etc.) Option 1 is a nightmare because refactoring requires taking into consideration ALL usages of the object, regardless of whether or not the changes are relevant to the caller. Option 2 sucks because your Object hierarchy is combinatorial on the number of distinct _callers_. That's why it is so hard to refactor large systems programmed in this style. > 3. The classes get huge and painful. The author observed the combinatorial explosion of facts! If you have a rich information landscape that is relevant to your application, you are

CitesView on HN
@filoeleven2025 · in “Why I Program in Lisp”

I like "Clojure, Made Simple" even more. link Someone helpfully pulled out this chunk, which is a good illustration of why data is better than functions, a key driver of Clojure's design. ▶ this video

RecommendsView on HN
@lispisok2024 · in “Don't let dicts spoil your code”

Maps arent nearly as problematic in clojure because data is immutable by default on top of the functional paradigm where your program is basically a big composition of functions and the language is built around using maps. In Python I largely agree with the author. In clojure I love my maps. Here is Rich Hickey with an extreme counter example although I would argue he's really demonstrating against getters and setters. ▶ this video

CitesView on HN
@hcarvalhoalves2024 · in “Don't let dicts spoil your code”

Debatable. Here's a counter-point: ▶ this video But ok, it's less bad in Python since objects are dicts anyway and you don't need getters.

CitesView on HN
@travisjungroth2023 · in “”

A classic rant by Rich Hickey: ▶ this video I say this even though I don’t usually code this way: I think the big benefit for business code is sort of a constrained flexibility. Objects tend to get really big (the alternative is you have a ton of classes). Think about all the data that makes up one Uber ride. So if I want to do anything with a Ride, I need everything. An even the many classes thing doesn’t really solve that because maybe what I want is cross-cutting. So either way, I just end up having to supply a bunch of stuff I don’t need. The maps-first approach is more incremental. Every function takes what it needs and gives what it can.

Strongly recommendsView on HN
@stefcoetzee2023 · in “A History of Clojure (2020) [pdf]”

Where generally the proverbial "one data structure" is a hash map. "Just use a map" [0] [0] ▶ this video

CitesView on HN
@ducktective2022 · in “Rust: A Critical Retrospective”

> I found Rust syntax to be dense, heavy, and difficult to read Reminds me of this section of Rich Hickey talk: ▶ this video

CitesView on HN
@simongray2022 · in “Try Clojure – An interactive tutorial in the browser”

> there was no type-checking (...) intellisense/autocomplete popups for the methods. First of all, yes there is. Maybe your editor didn't support it, but e.g. IntelliJ IDEA with the Cursive plugin does. Secondly: ▶ this video

CitesView on HN
@uDontKnowMe2021 · in “Six Years of Professional Clojure”

Not who you are responding to, but the common idea that static types are all win and no cost has become very popular these days, but isn't true, it's just that the benefits of static typing are immediately apparent and obvious, but their costs are more diffuse and less obvious. I thought this was a pretty good write up on the subject that gets at a few of the benefits link Just to name some of the costs of static types briefly: * they are very blunt -- they will forbid many perfectly valid programs just on the basis that you haven't fit your program into the type system's view of how to encode invariants. So in a static typing language you are always to greater or lesser extent modifying your code away from how you could have naturally expressed the functionality towards helping the compiler understand it. * Sometimes this is not such a big change from how you'd otherwise write, but other times the challenge of writing some code could be virtually completely in the problem of how to express your invariants within the type system, and it becomes an obsession/game. I've seen this run rampant in the Scala world where the complexity of code reaches the level of satire. * Everything you encode via static types is something that you would actually have to change your code to allow it to change. Maybe this seems obvious, but it has big implications against how coupled and fragile your code is. Consider in Scala you're parsing a document into a static type like. case class Record(

CitesView on HN
@daly2021 · in “Languages you must know #10 (Lisp)”

Rich Hickey "thinks in lisp". For example, he talks about his "maps" data structure (aka association lists). See ▶ this video Since data and programs are the same thing in lisp you can fluidly shift from one to the other, like I did with "knowledge" vs "rules". They both have the same representation (defstructs) but they are also code and have execution semantics. Clojure allows you to do this with map objects. The fact that you can use the whole language on everything at any time and that everything at any time is also "the language" is how you "think in lisp". Nobody thinks of Python programs as "data" or data as Python programs. Watch anything Rich Hickey talks about. He really "gets it".

Strongly recommendsView on HN
@TacticalCoder2021 · in “Clojure from a Schemer's Perspective”

> Do people actually build large codebases with the 'hash map first' approach? There are a few large projects written in Clojure. I'd say it's a "data first" approach, not uniquely "map first". There's this famous 4 minutes rant by Rich Hickey (the creator of Clojure) where he talks about maps and about how Java does OOP (and how maps are served through getters but you can't see easily that they're maps), it's golden: ▶ this video

Strongly recommendsView on HN
@simongray2020 · in “The Future of Clojure”

The same amount of static analysis as Python, Ruby, or any other language that doesn't have static type checking. Some people need something to happen when they press dot, though: ▶ this video

JokeView on HN
@simongray2020 · in “Pretending OOP Never Happened”

> I have an object... what do I do with it? So I hit the '.' on my keyboard and read the list of things that the object can do. As a counterpoint (relevant Rich Hickey rant): ▶ this video

CitesView on HN
The Language of the System - Rich Hickey1:02:50

The Language of the System - Rich Hickey

ClojureTV
174K views • 13 years ago
Effective Programs - 10 Years of Clojure - Rich Hickey1:14:52

Effective Programs - 10 Years of Clojure - Rich Hickey

ClojureTV
176K views • 9 years ago
Are We There Yet - Rich Hickey1:10:05

Are We There Yet - Rich Hickey

Zhang Jian
24K views • 7 years ago
Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure53:56

Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure

jasonofthel33t
119K views • 13 years ago
"Simple Made Easy" - Rich Hickey (2011)1:01:39

"Simple Made Easy" - Rich Hickey (2011)

ClojureTV
434K views • 5 years ago
Clojure for Java Programmers Part 1 - Rich Hickey1:48:13

Clojure for Java Programmers Part 1 - Rich Hickey

ClojureTV
131K views • 13 years ago
Clojure for Lisp Programmers Part 1 - Rich Hickey1:28:59

Clojure for Lisp Programmers Part 1 - Rich Hickey

ClojureTV
25K views • 13 years ago
Rich Hickey: Deconstructing the Database1:06:24

Rich Hickey: Deconstructing the Database

InfoQ
106K views • 14 years ago
Clojure Concurrency - Rich Hickey2:32:39

Clojure Concurrency - Rich Hickey

ClojureTV
73K views • 13 years ago
Spec-ulation Keynote - Rich Hickey1:16:14

Spec-ulation Keynote - Rich Hickey

ClojureTV
135K views • 9 years ago
"Simple Made Easy" - Rich Hickey (2011)1:01:39

"Simple Made Easy" - Rich Hickey (2011)

Strange Loop Conference
219K views • 5 years ago
The Value of Values with Rich Hickey31:44

The Value of Values with Rich Hickey

InfoQ
145K views • 14 years ago
"Transducers" by Rich Hickey45:00

"Transducers" by Rich Hickey

Strange Loop Conference
116K views • 12 years ago
Maybe Not - Rich Hickey1:03:29

Maybe Not - Rich Hickey

ClojureTV
181K views • 7 years ago
The Maximal Graph - Wilker Silva39:15

The Maximal Graph - Wilker Silva

ClojureTV
8K views • 6 years ago
Rails Conf 2012 Keynote: Simplicity Matters by Rich Hickey36:53

Rails Conf 2012 Keynote: Simplicity Matters by Rich Hickey

Confreaks
220K views • 14 years ago
Hammock Driven Development - Rich Hickey39:49

Hammock Driven Development - Rich Hickey

ClojureTV
333K views • 13 years ago
Simplicity Ain't Easy - Stuart Halloway50:01

Simplicity Ain't Easy - Stuart Halloway

ClojureTV
24K views • 13 years ago
"Design in Practice" by Rich Hickey1:00:46

"Design in Practice" by Rich Hickey

ClojureTV
65K views • 3 years ago
Understanding Specter: Clojure's missing piece40:31

Understanding Specter: Clojure's missing piece

Misophistful
12K views • 9 years ago