Functional TypeScript by Victor Savkin.
From the post:
When discussing functional programming we often talk about the machinery, and not the core principles. Functional programming is not about monads, monoids, or zippers, even though those are useful to know. It is primarily about writing programs by composing generic reusable functions. This article is about applying functional thinking when refactoring TypeScript code.
And to do that we will use the following three techniques:
- Use Functions Instead of Simple Values
- Model Data Transformations as a Pipeline
- Extract Generic Functions
Let’s get started!
…
Parallel processing has been cited as a driver for functional programming for many years. It’s Time to Get Good at Functional Programming
The movement of the United States government towards being a “franchise” is another important driver for functional programming.
Code that has no-side effects can be more easily repurposed, depending on the needs of a particular buyer.
The NSA wants terabytes of telephone metadata to maintain its “data mining as useful activity” fiction, China wants telephone metadata on its financial investments, other groups are spying on themselves and/or others.
Wasteful, not to mention expensive, to maintain side-effect ridden code bases for each customer.
Prepare for universal parallel processing and governments as franchises, start thinking functionally today!