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.

  • ℕ𝕖𝕞𝕠@slrpnk.net
    link
    fedilink
    arrow-up
    6
    ·
    11 days ago

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

      • ℕ𝕖𝕞𝕠@slrpnk.net
        link
        fedilink
        arrow-up
        5
        ·
        11 days 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.

    • macniel@feddit.org
      link
      fedilink
      arrow-up
      3
      ·
      11 days 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”.