Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Blackpill me on functional programming

Name: Anonymous 2018-10-11 14:34

No bluepilled answers please.

Name: Anonymous 2018-10-11 14:42

based and redpilled

Name: Anonymous 2018-10-11 15:49

Go away with your boomer memes.

Name: Anonymous 2018-10-11 15:59

>>1
1.Garbage collection adds unpredictable latency.
2.High memory use.
3.Reliance on recursion and its optimizations
4.Requires concentrated mental effort to understand, code isn't self-evident.
5.Different terminology and culture of programming that prevent newcomers.
6.Functionally impure/unsafe code is often required for performance and its essentially what the "pure functional code" is built on.
Reading GHC runtime source code is reccomended to understand on what foundantions the "safe&functional" languages stand.

Name: Anonymous 2018-10-11 16:15

It's mental masturbation for people who aren't smart enough for real mathematics.

Name: Anonymous 2018-10-11 16:21

It's mental masturbation for people who are just too smart for real mathematics, but too dumb for object oriented design.

Name: Anonymous 2018-10-11 16:24

If mathematicians are so smart, how come they chose a field with shitty career prospects, like teaching math?

Name: Anonymous 2018-10-11 16:28

>>7
Mathemathicians choose it because its like a form of art/discovery to them, not because it pays alot.

Name: Anonymous 2018-10-11 16:43

>>4
1.Garbage collection adds unpredictable latency.
Functional programming languages do not necessarily need run-time garbage collection. In fact, they make it easier to avoid it.

2.High memory use.
No reason to think that.

3.Reliance on recursion and its optimizations
Is that bad?

4.Requires concentrated mental effort to understand, code isn't self-evident.
This is not true, in fact I would argue the reverse.

5.Different terminology and culture of programming that prevent newcomers.
How so?

unsafe code
It's not unsafe if you have proven its correctness.

Reading GHC runtime source code is reccomended to understand on what foundantions the "safe&functional" languages stand.
Recommended by whom?

Name: Anonymous 2018-10-11 16:46

>>7
Because we are so smart we care not for useless materialistic values, but instead our target is to reach enlightenment via gnosis in order to defeat the despicable demiurge that imprisoned us, wild souls of the divine, into this physical realm.

Name: Anonymous 2018-10-11 16:47

>>8
alot
Maybe you should've studied English instead.

Name: Anonymous 2018-10-11 16:59

Functional programming is like very elegant lego-like construction puzzle with very complex parts that combine to form little robots. Something like a bait for autists that want to combine these lego-blocks and discover their new functions.
Handmade robots(algorithms) are much harder to write down vs lego-pieces that are easy to create and are safer to handle, but their limitations are not apparent to the autists playing with them, they only see the surface level functionality, they can't comprehend that there is limited amount of valid combinations of these lego blocks which can't cover the code space inside the lego-blocks, which the lower-level algorithms are made from.
Lets see for example:the for loop is a versatile construct, much more versatile than a function designed to process an object. For loops are not limited and can be combined and nested with any variations you write. They're transparent and easily understood.
Now imagine for loops replaced by a zoo of various functions that process data with a customized for loop for each method of processing or applying functions. These methods (aka "lego pieces") are generalized to construct more complex mechanisms to process data, by stacking these blocks and functions in various orders.
The mastery of functional programming is about inventing terser and terser version of these lego-block pyramids regardless of their performance. The "elegant terse code" of functional programming is actually really ugly on the inside with superfluous copying and waste of memory space for perceived elegance.

Name: Anonymous 2018-10-11 17:01

>>10
Solving equations and deriving numbers is extremely rigid and materialistic discipline suitable for artificial intelligence, not living and breathing humans.

Name: Anonymous 2018-10-11 17:22

>>13
Solving equations and deriving numbers
This is not what mathematicians are doing though.

Name: Anonymous 2018-10-11 17:28

Mathemathics will be replaced with theorem generators, theorem explainers and theorem prover software. The humans would only supervise directions of research and read the results.
There isn't an absolute need for algebraic drudgery and manual work.

Name: Anonymous 2018-10-11 17:32

>>15
People said the same thing in the 1950s, that computers and calculators would replace mathematics. It didn't. Mathematicians just moved up a level of abstraction.

Name: Anonymous 2018-10-11 17:50

no side effects allowed

Name: Anonymous 2018-10-11 17:57

>>16
Mathematicians just moved up a level of abstraction.
Yes, this is what will happen again except it will skip several levels of abstraction from now.
It would look more like AI receiving orders and constructing/explaining proofs.

Name: Anonymous 2018-10-11 20:04

>>15
theorem fuzzing (trying every possible combination) mite b cool

Name: Anonymous 2018-10-11 21:03

>>19
Fuzzing is a brute-force approach, i'm sure they'll use genetic algos or neural networks to generate theorems from data or specific parameters.

Name: Anonymous 2018-10-12 9:40

>>9
>> 4.Requires concentrated mental effort to understand, code isn't self-evident.

This is not true, in fact I would argue the reverse.
So without consulting documentation what does this code do?
ap (ap . (liftM2 ap .) . liftM2 (.) (.) . (.) . (.)) ((. flip) . (.) . (.))

Name: Anonymous 2018-10-12 9:51

>>9
>> 1.Garbage collection adds unpredictable latency.

Functional programming languages do not necessarily need run-time garbage collection. In fact, they make it easier to avoid it.

As others have already pointed out, Haskell requires automatic, dynamic memory management: automatic memory management is necessary because manual memory management is unsafe; dynamic memory management is necessary because for some programs, the lifetime of an object can only be determined at runtime.
https://stackoverflow.com/questions/9952602/does-haskell-require-a-garbage-collector

Its much easier to avoid garbage collection by using a language where it doesn't exist at all, like C++.

Name: Anonymous 2018-10-12 10:02

Name: Anonymous 2018-10-12 10:08

>>9
>> 5.Different terminology and culture of programming that prevent newcomers.

How so?

You need to know functional programming vocabulary like Monadic endofunctors, zygohistomorphisms and category theory.`` A monad is just a monoid in the category of endofunctors, what's the problem?""
There is even a dedicated search engine to simplify the task of finding haskell functions.
https://www.haskell.org/hoogle/

Name: Anonymous 2018-10-12 10:11

>>9
>> 3.Reliance on recursion and its optimizations

Is that bad?
https://stackoverflow.com/questions/15688019/recursion-versus-iteration
Recursion is usually much slower because all function calls must be stored in a stack to allow the return back to the caller functions. In many cases, memory has to be allocated and copied to implement scope isolation.

Some optimizations, like tail call optimization, make recursions faster but aren't always possible, and aren't implemented in all languages.

Name: Anonymous 2018-10-12 10:13

>>9
>> unsafe code

It's not unsafe if you have proven its correctness.
The unsafe code in Haskell runtime in written in C. https://github.com/ghc/ghc/search?l=c

Where is the correctness proof and which software you used to prove it?

Don't change these.
Name: Email:
Entire Thread Thread List