All Courses, Kotlin, English
Introduction to Functional Programming in Kotlin(1)
Learn the main concepts of functional programming in Kotlin in a simple and practical way
All Courses, Kotlin, English
Functional Programming In Kotlin
And if you still has some questions, maybe this can be helpful:
Why should I learn functional programming?
Well, let's say it will give you more tools to be a better programmer, no matter what programming language you use.
Maybe you can't use FP in your daily basis (yeah, your boss is a dinosaur), but we're sure that if you learn these concepts, your programming style will improve A LOT.
And why should I use Kotlin to learn functional programming?
Kotlin is the cross-platform language of the future. Google already has official support to develop Android apps, but you can use it also for backend development, given that it's a first-class JVM language.
Also, Kotlin is a friendly language for Android developers, since it's an easy, concise and pragmatic language, and it supports a lot of functional constructs! Because of that, Kotlin is the perfect language to be introduced in functional programming!
But, are you sure this is really useful?
Sure thing! Some benefits of programming with functional style:
- It will allow you to make some tasks that would be must harder using your traditional style. Notice that Google used some functional core concepts from the very begining.
- Your code will be cleaner, with (much) less variables, and you wouldn't worry by "what if this is null"
- Your code will be more robust, will much less errors. The compiler will detect much more errors for you following the functional style. Also, your coding style will allow you to detect errors faster and easier.
- Your code will be more maintainable and adaptable. As Joe Armstrong said, the inventor of Erlang, with OOP you wanted a banana but what you got was a gorilla holding the banana and the entire jungle.
Is it going to be difficult?
It's not difficult, it's quite simple. But it's different to the OOP style, that you're probably used to. Rich Hickey, the inventor of Clojure, explained in his famous talk "Simple made Easy" the difference between "easy" (something you're use to, even though it's a mess) and "simple" (something that can be explained and understood quickly, without effort, even though it may be quite new for you).
Functional programming is simple, but even you're an experienced developers, you'll have to learn scratch. But we're sure that this isn't anything for PhD's, as you probably believed. But you'll have to invest enough effort: no pain, no gain, my friend...
How are you going to teach it?
Using short video lessons, less than 20 minutes, where you'll find explanations about specific concepts and techniques. They're usually simple concepts, but with a lot of uses and potential applications. Don't worry if you don't get it at first. That's normal, and you'll probably have to listen some videos more than once, in order to understand all the details.
Each video includes several practical and everyday examples. We won't talk about fibonacci, factorials and other mathematical examples. We'll use daily situations and challenges, but solved differently. And if next you want to jump into pure functional languages, it will be much easier for you.
I don't know Kotlin, but I know how to code in X
Awesome! Kotlin is just the vehicle, but the important thing is the payload. Our code is quite easy to read and we use the simplest features of the language. It's in fact a good way to be introduced in a new language from a different side: instead of focusing on the syntax, focusing on the style.
And if you already know Java, then it will be even easier for you: this is the perfect excuse to learn Kotlin!
Is there any other requirement?
Not really: you need to know how to code in any language (better if it's an OOP language), and you need to be interested in learning functional programming.
And it's even better if you already tried to learn FP without success. After this couse, you'll realize it wasn't that difficult