Redpill me on functional programming

Redpill me on functional programming

Attached: Funny_Moment_Gon_Nigga_Pass.jpg (750x422, 41K)

Other urls found in this thread:

fm2gp.com
twitter.com/SFWRedditVideos

it's a hell of a lot easier to learn than oo and it's much more secure
you have to think through what you want first

Formalizing programming as mathematical proof and let computer check it.

This made advance type systems,Pure functions and mananger explicit states

learn haskell my dude, it'll teach you more than I could

Ok bet
also checked

It's a meme, but it's a really good meme. Getting real work done in a purely functional language ranges from trivial to hair tearing. Real world problems usually end up on the hair tearing side. But for those problems which lend themselves to the functional paradigm... Oh lawdy it's sexy.

meme, just like OOP, just like xml, just like cloud, just like industry 4.0, just like machine learning. ergo: not completely useless but by far not the silver bullet it's made out to be

Really sad that the little Jow Forums fella from the Hunter Exam arc didn't become a hunter and develop a Nen ability to "hack into anything" using his mind

>secure
In what sense?

It's much harder to produce unintended side effects, pointer fuckups and the like.

it teaches you about data flow, you'll become a much better programmer as a result.
trivial implementation of data structures.
functors and applicatives
Monads
maps filters folds
referencial transparency

if your language is purely functional and strongly typed then a good compiler can get away with a lot of stuff you simply don't get anywhere else.

I disagree, you can mess up pointers just as easy with dep injection or by storing a pointer as a field as with passing around the pointer between functions (especially if using pure functions), i think what you refer to depends more on the language than with the paradigm itself

Technique is basically about mapping from one data space to another: just transforming data back and forth. Data isn't just information (say, for a person, their name and height and weight) but also can be functions on data (say, calculating BMI given weight and height)--this goes recursively so you can have functions that map functions that map functions that map data to data, all sorts of weirdness.

Practically speaking, it's easier to write code that takes data, transforms it, and outputs the transformed data. "Side-effects" or "mutation" are when you change data in-place, and that can make programs hard to reason about--especially if there are multiple paths of execution (threads) modifying the same data.

As a practical matter, functional programming is not so great for dealing with large blobs of binary data (you'll make lots of garbage with each byte toggled). There also is a problem where people writing functional code tend to end up with junk drawers full of functions instead of neatly setting the data up next to the functions for acting on it (not that enterprise OOP, different from Alan Kay OOP, doesn't have variants of the same problem).

Anyways, it's a useful lens for viewing programming problems, and a good tool for the toolbox. You should learn it as well as OOP and imperative programming.

(Declarative programming is the real shit, though.)

If programming languages were pre-compiled kiddie scripts.

It's not some bombshell that will change the planet, it's just a nice alternative to Object Oriented and Imperative.

I find it amazing for backend Web work. Erlang, elixir, and Phoenix are all great tier

Learn lambda calculus (not only untyped but typed as well), combinator calculus, and lisp.
Haskell is for hipsters, a programming language that is purely one paradigm is just a meme.
Also static typing is a joke, it shouldn't be used.
People seem to forget that the original purpose of introducing typing to lambda calculus was to allow it to represent pure mathematical logic without paradoxes ,which requires a lack of being turing-complete, meaning it is unsuitable for general usage.

Is there a good book regarding functional programming in C++? I figure since the language already supports it, might as well use what I've got instead of pulling in all the tools and libraries and shit for something else.

Attached: thinking nep.jpg (322x326, 30K)

>C++
>Functional programming
what a joke

>Also static typing is a joke, it shouldn't be used.
why?

great if your are into maths

fm2gp.com

See below sentence.