DEV Community

Discussion on: JavaScript's Functional Programming Mythology

Collapse
 
pentacular profile image
pentacular

Functional programming is about leveraging invariant relationships.

It is their invariance which gives benefits, since it means that there is no change in the system.

Which means that time must be modeled explicitly in a functional system.

Not to be confused with procedural abstraction, which leverages decoupling implementation and interface by using procedure calls.

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

This is yet another definition that I've heard for FP.

To be clear, I'm not saying that it's in any way "wrong". I'm just saying that FP tends to evoke a lot of different definitions from a lot of different people.

Collapse
 
pentacular profile image
pentacular

I think it's broadly misunderstood, and there is usually a conflation of 'functional programming' with a 'functional programming style'.

The functional programming style is generally procedural abstraction, with an aspiration to avoid side effects, but misses the fundamental qualities of functions.

But without understanding the fundamental qualities of functions, it's hard to know where and when it's appropriate, which leads to a general devolution into superstition and mythology. :)

Which is why I always bring it back to time -- it isn't time invariant, it isn't a function.

Once you understand this, everything else flows naturally from this fundamental property.

Thread Thread
 
bytebodger profile image
Adam Nathaniel Davis

You have explained this extremely well. Excellent points - all of them.

Some comments have been hidden by the post's author - find out more