5 ms·
I understand that Rich Hickey is a fantastic developer, a productivity multiplier, and an industry leader, but I have a few issues with his portrayal of types.
by yawaramin 9y ago
I understand that Rich Hickey is a fantastic developer, a productivity multiplier, and an industry leader, but I have a few issues with his portrayal of types.
In this talk he has repeatedly cherry-picked the most negative examples from every type system, while ignoring the more positive, simple, and elegant type system features. E.g., he talks about languages which represent product types as `int * int * string * string * ...`, i.e. as nameless clumps of data, while ignoring that those same languages usually support much richer record types which are of course product types with field labels.
Then he talks about Java types being non-composable while ignoring generics and row polymorphism in other languages. He talks about Clojure maps being powerful while ignoring the same maps with the same power in static languages. He talks about type system complexity while ignoring the mental burden of keeping the types in your head in a totally dynamic system like Clojure. Ironically, he even talks about how you can handle five to seven arguments mentally before getting lost, while ignoring that in a dynamically-typed system you're left to your own devices handling much higher cognitive loads.
Another beef I have here is he repeatedly talks about pattern-matching in 500 different places, and having to go and update them, while ignoring the fact that _no one does that,_ we actually do write modular code with data structures as abstract as possible and try to provide powerful, general-purpose functions which manipulate them instead of exposing all the variant cases for raw pattern-matching. PM is great, but it's still important to limit its use for scalability reasons.
I don't know to what extent he has explored the type systems of ML-family languages. But he certainly does not present them accurately here. I would love to see him just do a debate-style talk with someone really well-versed in type theory as well as practical systems, say, Yaron Minsky of Jane Street.
- steinuil 9y agoI don't think he has explored Haskell's type system that deeply, since he mentioned Haskell as a complex language along with Java and C++. Haskell has a very simple core.
- platz 9y agoI think he's familiar enough; you also don't want to mistake the trees for the forest.
- platz 9y agoRich would probably do very well in a debate-style talk. The art of argumentation is very subtle. If you think there'd be a blowout that entirely discredits the dynamic typing camp—that would rather be like expecting a debate that completely invalidates one side of republican/democrat debate. There are simply core values each side has that are very hard to persuade someone out of. mostly, what people do is "talk to their base/tribe", and then snipe the other side with cheap shots.
- yawaramin 9y agoI'm not even looking for a winner-take-all argument. I just want someone to be able to immediately correct Rich when he says something wacky about static typing. E.g., 'You don't have labelled arguments!' 'You have labelled arguments since Standard ML i.e. at least the '80s, e.g.: $ poly Poly/ML 5.7 Release > fun add { num1, num2 } = num1 + num2; val add = fn: {num1: int, num2: int} -> int > add { num1 = 1, num2 = 0 }; val it = 1: int
- christophilus 9y agoYeah. He's aware of that. I think he's generally talking to Java crowds, so the static typing experience of the general programmer is pretty bad. That said, I liked this talk and agreed with much of it.
- yawaramin 9y agoThere are options on the JVM outside of Java, from Kotlin to Scala to Whiley to Eta, or even OCamlJava which might be nearing a release. An alternative to dismissing static typing entirely based on Java, is looking at other languages which have less verbose, more elegant type systems on the JVM. RH is ignoring that aspect completely. Understandable, based on his worldview and experience, but not very accurate.
- mpweiher 9y ago> wacky about static typing No more wacky than the claims people make about dynamic types, e.g. "You can't have refactoring with dynamic types" Refactoring was invented on Smalltalk. etc.