6

Functional Programming being touted as the silver bullet for all types of modern programming challenges.

Why? As far as I can tell, it doesn't deliver. Sure certain approaches help with specific kinds of problems. Yet, it is cumbersome for general purpose problems and downright harmful for performance critical problems. For doing math problems it is great and I see value. For most else, eh, I have work to do.

Comments
  • 4
    I wish devrant had a laugh react so i could laugh at the fool you are
  • 1
    @halfflat Yeah, I use it in some places in C++ as well. But every article I read about it is so all or nothing it is laughable.
  • 1
    Yo as frontend I’m curious what it benefits to me. I’ve seen a lot so far, but all of them could have been simpler and faster.

    Besides, most companies don’t even get redux right, so this is also a point where i’d say to just stick what works already.
  • 2
    @010001111 That is another beef I have with FP articles and books. They always show the "how" and hardly ever the "why". The why is usually stuff like: its good for parallel programming. But it never goes into how current approaches are insufficient.
  • 1
    @010001111 But reading FP articles HAS influenced how I program though. For instance I tend to add the qualifier "const" to things I explicitly don't want to change. It helps me and others from doing stupid things to variables that should be immutable. I also tend to use lambdas a lot now.
  • 1
    I don't see the problem with this. Even though I love functional programming and constructs and see the real world value of it in a lot of the things that I do. I invite others to properly consider the point of op: the fad like mentality towards FP as a silver bullet for literally everything that we develop, this is wrong, and I see people applying FP concepts on things that has side effects being forced to not have any side effects at all, effectively using FP for the wrong things.

    Not every solution is better served with a functional programming paradigm in place, considering this is just over the top. I can say though that stating that it does not deliver seems strange to me, the op could clarify this for the rest of the class since I don't know why he would state that it does not deliver, in my opinion it does, but this is only in certain scenarios.
  • 1
    >Functional Programming being touted as the silver bullet for all types of modern programming challenges.

    Literally no one's making that argument - your shitty OO language implementing map, fold and reduce is not FP.

    >Yet, it is cumbersome for general purpose problems

    Maybe if you're emulating it in an OO/procedural language? Haskell code (even including state) flows nicely.

    >and downright harmful for performance critical problems.

    Realistically speaking, the right argument to make here is not that it's impossible to make functional code quick, it's that it's impossible to write a simple and efficient FP compiler: GHC produces extremely fast code but it's really, really complicated.

    >For most else, eh, I have work to do.

    There are actual, real-life companies that build their entire platform on top off Haskell (Wire), Elixir (Discord, to an extent), OCaML (Jane Street Capital) and so on. "I have work to do" shows your lack of experience.
  • 0
    @heyitspuggo homie you can disagree without being that into it
  • 0
    is this bait?

    Please don't spread FUD about something you disagree with, without even trying to understand the reasoning.
  • 0
    The only problem I can see with FP is that it is slow for performance critical application like game.

    I think FP will also use a lot of memory even though I have not seen the problem in FP project I work before.
Add Comment