DEV Community

Discussion on: Explain functional programming paradigm Like I'm Five

Collapse
 
jessekphillips profile image
Jesse Phillips

I read somewhere that functional programming was easier for young kids to understand than imperative. Maybe you should ask for it to be explained like you're 20.

I'm not sure I think functionally enough to help achieve that state. I would say that the main gate is for your function calls to take arguments, don't modify them and chain those functions.

D has a keyword, pure, to help enforce these rules. But it defaults to what is referred to as weakly pure.

Collapse
 
temporal profile image
Jacek Złydach

I read somewhere that functional programming was easier for young kids to understand than imperative. Maybe you should ask for it to be explained like you're 20.

This is true in so far as this is how math works, and people learn that in school. Learning imperative programming involves understanding things like "function" of "what X = 2 means" differently than in math classes, whereas in functional programming, those concepts are behave similar to math.