What's the point of functional programming?
What's the point of functional programming?
Other urls found in this thread:
functionalcs.github.io
twitter.com
It looks nice.
You know what they say: there's a reason why the syntax is called point-free.
It is clearer and "purer" for certain use cases. It is not objectively better or worse than object oriented programming, both just are syntactically better at certain use cases.
Functional programming is purely "data in, data out". Nothing is left in abstraction.
array programming is better anyway
whats the point of OOP eternal extraction?
Getting rid of side effects in as many places as possible makes reasoning about state much easier.
thanks for the good answer
It stop pajeets from doing things too abysmal.
Using vidyas lingo, I'd say it highers the skill floor and lowers the skill ceiling
fuck, I accidentally answered to the question "what's the point of OOP" instead.
To function
What is functional programming?
>Functional programming is purely "data in, data out". Nothing is left in abstraction.
I believe functional programming has heavier abstractions than OOP. Monads, arrows, zippers, monad transformers, fixed points, higher order polymorphism, lots of concepts from category theory. Those things make functional programming effective and worth learning and are far from simple data in data out.
Do I need to understand category theory to understand functional programming
how does procedural compare against OOP and functional? I still do most of my serious programming in C. I haven't felt limited by the amount of abstraction it offers.
to keep pajeets out of the good jobs
you don't need to understand anything to be a programmer really
Functional programming is like communism. It's the ideal form of programming(/government), but it's impossible to implement 100%.
So it should be seen as a goal to head towards, rather than something that either is or is not.
You can make your programs _more_ functional, but you can never have a 100% functional program and it do anything useful.
Never go full retard
>communism. It's the ideal form of government
I remember high school
You know full well that functional programming, object oriented programming, and so forth can be done in C. The list of things that cannot be done conveniently in C is short. If the macro language were better the list would be empty.
I hold out hope that eventually the "betterC" version of D will reach the point where I can write a program that doesn't link against the D runtime, doesn't need to insert typeinfo and moduleinfo into the object file, and has working struct deconstructors. That last one is the sole thing from C++ I miss when I am programming in C.
>The list of things that cannot be done conveniently in C is short. If the macro language were better the list would be empty.
The list of things that cannot be done conveniently in C contains everything that can be done.
>What's the point of functional programming?
weaponized autism
job security
>government
You meant to say society.
so neets can think they're smart
This may be true enough if you say that C is describing a result, but not so much if you say that it's actually mimicking FP. At runtime, C can achieve the same result as other langs, if only by implementing them. At compile time, that's far from true.
Functional programming prevents side-effects in programs by forcing each function to be referentially transparent. Lack of a shared state allows for deterministic parallelism, no such thing as race conditions. Lack of dependencies and side effects means functions can easily be composed without any errors. Treating functions as data provides a great deal of abstraction since functions can be used as arguments to functions and returned from functions. Functional code is typically much more readable than imperative code. Functional programming comes from lambda calculus which is a mathematical discovery rather than a mechanical invention.