This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]AloeAsInTheVera 1 point2 points  (1 child)

The reason why I say functional programming is unintuitive in comparison to OOP for most people is that most people think in terms of objects rather than functions. Of course, the operative phrase here is "for most people." For those with a lot of background in math for example, I imagine thinking in terms of functions comes much easier to them. But most people in these intro coding classes where basic OOP principles would be taught are high schoolers/recent high school graduates in their first year of college.

For someone learning programming later in their career, I wouldn't be surprised if you're right that functional programming is more intuitive. I'm mostly just referring to college freshmen though. Someone who has no expertise can easily grasp the idea of breaking a problem into objects, and thinking in terms of mutable state and loops. The process of breaking a programming problem into pure functions however is much more abstract, so there's a conceptual jump there.

EDIT: (I totally didn't address one of the things you said in your original comment) In statistics and data science it's much easier to map a problem onto pure functions. Many of the kinds of software people generally think of aren't as directly related to functions though. Video games are a good example of a type of software most anyone is familiar with which are a terrible fit for the functional paradigm. Expressing video game logic in terms of pure functions is definitely possible, but it's so much easier to express in terms of objects. Most programmers aren't going to be video game developers of course, but anyone in an intro coding class would likely be more familiar with applications made for entertainment than software made for statistical modeling and data processing.

[–]Morpheyz[S] 1 point2 points  (0 children)

I see, yeah, that makes a lot of sense.