Skip to main content
1 of 2

If functional programming is expensive and memory-consuming for small data, why do we need it for Big Data ?

Specifically I can already see a few applications where this is extremely useful. ex. Statistics, ie calculating a Gaussian function on the fly with different parameters or a set of parameters for data analytics. There is also interpolation for numerical analysis, etc.

What are the best practices to use functional programming (Scala) for Big Data ?

To answer on efficiency there are also techniques to help increase your efficiency in space or time, specifically recursion, tail recursion and continuation passing style, currying, etc. Some languages have their pros and cons (example lazy vs eager.) For something simple like the Fibonnacci sequence I might just use the imperative way (I still prefer functional for fibonnacci since it is easier to read) in something based off of a C language but for other purposes I might use some of the techniques and functional programming for writing quick, clean, "easy to read" (although I find this subjective) code.