What Is Functional Programming?
When you think of functional programming, you probably imagine a bunch of mathematicians sitting around at a conference table with clipboards and notepads. They're all wearing bowties, saying things like "Let's define our functions!" and "How do we apply them?" The truth is that functional programming is much more fun than that—and it has nothing to do with math. It's a software development model that estimates and applies mathematical functions rather than state or mutable data and imperative code threads. Functional programming is the natural origin of functional languages like Haskell and Scala, which have been around since the 1990s but have only recently gained popularity in the mainstream industry. The result is always the same when you write code in functional programming. Functions are like little robots that take in data and spit out results. They don't care about how long it takes them to do it, what machine they're on, or if someone has forgotten to feed them that morning. When you write code in imperative programming, it's more like a bunch of kids running around with their hands on a computer game controller. You never know when one of them will press "B" instead of "A" and mess up the whole game for everyone else. Functional programming can be realized in any language, even one not designed with default functional programming structures. When writing functional code, some specific characteristics are helpful to keep in mind. First, you'll want to make sure you have a good understanding of the basics: recursion, strictness, and immutability and then, you'll want to think about functions as pure transformations on data rather than as imperative commands. But don't stress! It's not like you have to write your programs in Haskell. You can do all this in any language, even without built-in support for functional programming!
Related Terms by Software Development
Join Our Newsletter
Get weekly news, engaging articles, and career tips-all free!
By subscribing to our newsletter, you're cool with our terms and conditions and agree to our Privacy Policy.