Functional Programming on the JVM with Daniel from RockTheJVM
Jul 3, 2023
auto_awesome
Daniel Ciocîrlan from RockTheJVM discusses functional programming on the JVM, including concepts, learning approaches, object-oriented programming, immutability, recursion, concurrency models, Project Loom, and a comparison of Scala and Kotlin. They also explore mental models for parallel, concurrent, and distributed systems, and the importance of building something real when learning Scala.
Functional programming emphasizes thinking in terms of expressions and using functions as values.
Scala and Kotlin are compared, with Scala praised for its mature and powerful language.
Deep dives
Functional Programming on the JVM: Exploring Different Programming Ideas
The podcast episode discusses functional programming on the JVM, comparing ideas from Java, Kotlin, and Scala. It emphasizes the importance of shifting mindset from imperative code to expressions, which is a core aspect of functional programming. The episode also highlights the use of functions as values and immutability in functional programming. It explores different concurrency models in Scala, including futures, Akka actors, and effect systems like cats effect and Zio. The episode acknowledges the maturity of the Scala ecosystem while mentioning areas for improvement, such as tooling and growing the Scala community. The host provides tips for beginners to start learning Scala, encouraging them to build real projects and gain hands-on experience.
The Core Principles of Functional Programming
Functional programming is described as a different way of thinking and approaching code, shifting from instructions to expressions. The episode highlights the importance of thinking in terms of expressions and using functions as values. It emphasizes the concept of immutability and its benefits in managing side effects and designing distributed systems. Recursion is discussed as a replacement for iteration in functional programming. The episode compares functional programming with object-oriented programming, stating that they are not opposites but separate concepts that can coexist. The benefits and challenges of immutability in functional programming are explained, including garbage collection and tail call optimization. Concurrency models such as futures, actors, and effect systems are introduced as ways to handle parallel and distributed code.
Comparing Kotlin and Scala in the Functional Programming Landscape
Kotlin and Scala are compared in terms of their feature sets and ease of writing code. The episode recognizes Kotlin's simplicity and smoother learning curve, particularly for those coming from a Java background. Scala is praised for its mature and powerful language, with Scala 3 being highly anticipated. The host acknowledges Scala's steeper learning curve and emphasizes the need for improved tooling and a growing Scala community. The episode also highlights Kotlin's core routines and Scala's futures, Aka actors, and effect systems as different concurrency models. The discussion touches on current limitations and areas for improvement in the Scala ecosystem, while expressing optimism about the passion and drive of the Scala community.
Tips for Getting Started with Scala and Functional Programming
The episode offers tips for beginners to start learning Scala and functional programming. It suggests building something tangible and real to gain a true feel for the language and its principles. The importance of hands-on experience and building projects that align with personal interests is emphasized. The host encourages trying out toy exercises and then progressing to real-world applications. Rock the JVM is mentioned as a resource to make Scala approachable and exciting for learners. The episode concludes by highlighting the value of building something meaningful with Scala and embracing the functional programming mindset.
Hey Everyone,
In this video I was joined by Daniel Ciocîrlan from https://rockthejvm.com and we discussed Functional Programming concepts in great detail.
Chapters:
00:00 Introduction
03:11 What is Functional Programming? How can I start learning?
11:40 Object Oriented Programming and Functional Programming
16:08 How should a beginner approach learning Functional Programming?
21:58 Handling Side Effects (Pure functions)
28:04 Immutability and Recursion
35:59 Concurrency Models (Futures, Co-routines, Actors)
42:47 Project Loom
46:42 Scala vs Kotlin
49:01 Current Limitations and Future
RockTheJVM : https://rockthejvm.com
I hope you like the episode, please like, share and subscribe for more videos.
Cheers,
The GeekNarrator
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.