This presentation was recorded at GOTO Copenhagen 2019. #GOTOcon #GOTOcph http://gotocph.com Maurice Naftalin - Java Champion & Author José Paumard - Java Champion, JavaOne Rockstar, Architect, Coach & Trainer ORIGINAL TALK TITLE The Sincerest Form of Flattery ABSTRACT Functional programmers have been saying for decades that they know the way to the future. Clearly they've been wrong, since imperative languages are still far more popular. Clearly they've also been right, as the advantages of functional programming have become increasingly obvious. Is it possible to combine the two models? Scala is one language that does this and Java too has been on a journey, which still continues, of learning from functional languages and carefully adding features from them. In this talk, we'll review what Java has learned from functional languages, what it can still learn, and how its added features compare to Scala's [...] TIMECODES 0:00 Introduction 3:05 Functional Programming: Elegant, Mathematically Sound 4:15 Object-Oriented Languages: Successful but Envious 7:33 Java Ate Pizza in Three Courses 9:43 Generics - Stating the problems 14:28 Type Erasure in Generic Java 16:10 Type Erasure: How does it work? So the compiler is doing the type checking 18:31 Type Erasure vs. Inheritance How is inheritance handled? 24:18 How about List in Java? 25:37 Wildcards to the rescue! (really?) 33:22 Closures in Pizza 34:25 Closures Lambdas in Java 36:08 Closures in Scala 37:44 Partial Application in Scala 42:07 Pattern Matching in Pizza Just a switch on types already with deconstruction 43:52 Pattern Matching in Java 47:22 Conclusion Download slides and read the full abstract here: https://gotocph.com/2019/sessions/887/the-sincerest-form-of-flattery https://twitter.com/GOTOcph https://www.linkedin.com/company/goto- https://www.facebook.com/GOTOConferences #Java #FunctionalProgramming #FP #Scala #Programming Looking for a unique learning experience? Attend the next GOTO Conference near you! Get your ticket at http://gotocon.com SUBSCRIBE TO OUR CHANNEL - new videos posted almost daily. https://www.youtube.com/user/GotoConferences/?sub_confirmation=1
Get notified about new features and conference additions.