So you think you’re important?
Functional programming has become popular in the past few years. You use it to describe what you want to do, such as applying an operation to all the elements of an array, instead of describing how to get what you want, like creating a ‘for’ loop to visit all the elements of an array.
The biggest advantage of the functional programming paradigm is that you’ll learn a new way of thinking and solving problems, and it will make your code smaller and more concise. Functional programming is suited for concurrency mainly because the compiler takes care of most operations that require the use of a state variable. So you can reuse your functions and modules because you know that they don’t have side-effects as is the case with object oriented and functional programming languages.
Another advantage of functional programming is that it offers an easier method of debugging because the code is simpler. Finally, functional programming offers easier testing: if a subprogram works today, it’ll work all the time.
Programming languages such as Erlang and Elixir, which uses the Erlang VM just like Kotlin uses the Java VM, are perfect for developing server applications. But they can’t develop Android applications, which is where Kotlin can help. So, always use the best tool for the job!
Bear in mind, however, that a bad developer can write bad code in any programming language. So don’t think that a programming language or a programming paradigm can save you from bad code!