this post was submitted on 27 Mar 2025
33 points (100.0% liked)

Out of the loop

12426 readers
1 users here now

A community that helps people stay up to date with things going on.

founded 2 years ago
MODERATORS
33
submitted 1 month ago* (last edited 1 month ago) by [email protected] to c/[email protected]
 

I've seen a couple posts in the top in the last 6 hours feed, and it seems like people are really up in arms about this functional programming stuff. Not really sure what it even is.

It looks like it's people writing bad programming or something? Like a lot of extra stuff that is not necessary?

EDIT: sorry everyone, I'm not a programmer and I don't know to much other than a little java and python. I guess I should have posted this in Explain Like I'm Five.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 1 month ago (2 children)

It's a programming paradigm where every action is made up of functions, functions which have no side effects beyond their explicit outputs.

[–] [email protected] 8 points 1 month ago (2 children)

I understand every one if those words, yet together I don't understand them at all.

[–] [email protected] 5 points 1 month ago

think of it as: It's a paradigm where you only use mathematical functions, rather than programmatic ones. Not completely accurate, but gets you closer. Uh, if you know advanced mathematics, anyway.

[–] [email protected] 4 points 1 month ago

Thanks! I love going down new (to me) paths!

[–] [email protected] 3 points 1 month ago

In addendum to the side effects, functions can certainly have side effects, as the global state is still accessible, but only those that don't are considered "pure".