Functional programming is a paradigm, which means that it doesn’t have an implementation. The basis of functional programming is lambda calculus, which is actually a math abstraction. So when you want to perform tasks by using the functional programming paradigm, you're really looking for a programming language that implements functional programming in a way that meets your needs.
In fact, you may even be performing functional programming tasks in your current language without realizing it. Every time you create and use a lambda function, you’re likely using functional programming techniques (in an impure way, at least).
Kotlin has significantly more functional features that Java does, but Kotlin still shows its Java roots. For purists, the Java connection is a problem because Kotlin code can look too much like Java code. Developers often look at languages based on need, rather than on strict adherence to a set of principles.
Still, you can find discussions online that say Kotlin isn’t quite as functional as Python and not nearly as functional as languages such as Haskell. These theoretical discussions don’t actually matter in the real world. You want to use Kotlin for Android development when functional programming is important because Kotlin
- Is suitable for Android and possibly system development, whereas Python focuses on data science and machine learning needs
- Can execute relatively quickly, even on devices that have less robust processors
- Uses a smaller number of lines of code when compared to Java due to the ability to use functional techniques
- Is easier to read than Java code
- Is easier to learn than Java, but not as easy as Python
- Offers multi-statement lambdas
- Has relatively compact collection comprehensions, which improve readability of collection manipulations
- Uses receivers to create complex code manipulations with simple names
- Has access to inline functions that actually do place the function into the surrounding code, making the application run faster (at the cost of size)
- Includes special functions to handle potentially null input
When working with Kotlin, you also get a bonus for Android development; You can use C++ libraries, too. The articles at yalantis.com and developer.android.com tell how to use these libraries. Given how Kotlin works, you can use C++ to augment your applications in a number of ways, especially when it comes to obtaining the last bit of speed from your application.Want to learn more about developing Android apps? Check out our cheat sheet.