The Sincerest Form of Flattery
summary
Compares how generics come into Java via erasure and synthetic bridge methods (so arrays of generics are illegal) versus Scala’s declaration‑site variance and immutable collections; notes Java ships generics in 2004 (Java 5) and lambdas in 2014, with lambdas implemented as single‑abstract‑method interfaces that only capture effectively final locals; shows Scala’s built‑in currying/partial application and contrasts that with Java method‑reference bound receivers; previews Java’s sealed types plus records and permits enabling exhaustive, checked pattern matching.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:22Maurice Naftalin
- 2:55Functional Programming: Elegant, Mathematically Sound
- 4:09Object-Oriented Languages: Successful but Envious
- 10:37Generics: Stating the Problems
- 14:46Type Erasure in Generic Java
- 16:50Type Erasure: How does it work?
- 18:21Type Erasure vs. Inheritance
- 21:15How about Arrays?
- 24:54Wildcards to the rescue! (really?)
- 28:06Generics in Scala
- 31:28Closures in Pizza
- 34:42Closures Lambdas in Java
- 37:10Closures in Scala
- 38:14Partial Application in Scala
- 42:39Pattern Matching in Pizza
- 46:30Pattern Matching in Scala
- 49:58Conclusion
related talks
38mThe Sincerest Form of Flattery
58mJava Sucks (So C# Didn't Have To)
56mJava Sucks (So C# Didn't Have To)
53mFun with var in Java 11
48mFaith, Evolution, and Programming Languages: from Haskell to Java
01h 02mFunctional Programming in Java, Groovy, and Kotlin
29mJava Method-Local Inner Classes are Unsound
44mTyping in Java, Kotlin and Scala
