3 ms·
I've seen a handful of articles and conference talks where the main thrust is "why isn't functional programming more popular". Apparently it works well and is "
by ryanmarsh 5y ago
I've seen a handful of articles and conference talks where the main thrust is "why isn't functional programming more popular". Apparently it works well and is "intuitive" for some people. I think the first thing we should do is recognize the amount of neurodivergence amongst programmers.
The WISV-IV GAI tests for verbal comprehension and perceptual reasoning. It provides an estimate of general intellectual ability, with less emphasis on working memory and processing speed. My GAI is 124. Which means I'm fairly intelligent (sic. "superior") when it comes to understanding language and reasoning. It makes me a fairly good problem solver. I'm an ok programmer (judged against the hundreds of programmers I've paired with through my consulting work).
That said, I've tried to learn Haskell three times and given up each time. The functional model of D3js kicks my ass. I cannot grok LISP.
It turns out my WMI (working memory index from Wechsler Adult Intelligence Scale) is BELOW AVERAGE. This makes holding lots of recursion or abstraction in my head at once quite difficult. I also suffer from adult ADHD.
I love long functions in a procedural style. I'm quite proficient working that way. There's not too much abstraction and behavior hiding (why I grew to hate OO). You can see how my neurological makeup impacts what "good" code looks like. I also understand that James Gosling has a kind of synesthesia and that impacts the structure of his code to the point of causing problems for others (see Lex Friedman interview).
I said all that to say this. What makes code understandable/readable/clean is in the eye of the beholder. There's quite a bit of neurodivergence in our field and we need to account for that when deciding on how to critique code. After all shouldn't code be written first and foremost for humans to understand and only incidentally for compilers? (paraphrased from SICP)
- jmfldn 5y ago"Apparently it works well and is "intuitive" for some people. I think the first thing we should do is recognize the amount of neurodivergence amongst programmers." Yep that's it! It suits my brain quite well but I totally get that it doesn't suit everyone's. This sort of point is under-appreciated, not just with FP, but with so many things in computing and life more generally.
- matthoiland 5y agoThank you for bringing up WISV-IV – it's a fascinating way to categorize intelligence. My son (11yo) is autism spectrum and recently received a WISV-IV evaluation and found him off the charts for spacial reasoning. It immediately had me thinking about object oriented programming and conceptualizing digital processes spatially. Perhaps functional patterns are preferred by those with faster "processing speed" of thought or "working memory" – basically thinking primarily of "just before" and "just after". My anecdotal experience has shown that the coworkers who think "the fastest" prefer functional patterns, whereas those who think slower but more comprehensively prefer object oriented. Also anecdotally, functional programmers rarely leave the keyboard, whereas OOP spend a lot of time on the mouse – both are equally productive at the end of the day.
- ryanmarsh 5y agoYes. I took those tests (and more as I presume your son did) for my ASD diagnosis. It was very enlightening and I feel like everyone should have a psych profile like that done.
- ur-whale 5y agoNot sure why you are being downvoted (maybe the "I'm a slightly above average programmer"). I think you are entirely correct, FP is both more suitable to certain type of people and to certain types of problems. I've used FP in some situations and loved it, and had to grapple with FP code that was utterly incomprehensible because the person that produced it seemed more interested in showing off what he could do with FP rather than actually getting the job done (or producing efficient code, for that matter).
- ryanmarsh 5y agoMe not understanding why that would be offensive is probably part of my autism spectrum disorder.
- zz865 5y agoIts not offensive, just any FP post brings out the FP snobs who often dont like criticism.
- vzaliva 5y agoIt depends on the audience background/worldview. From Christian moral tradition: "modesty is a virture". From modern rational thought: a self-assemsments like this are not reliable (see for example Dunning-Kruger effect) and the fact that author does not realize this erodes trust in the remaining of his argument.
- Zababa 5y agoProgramming is about expressing how to solve a problem. Of course different ways to express that will fit different people. Every time I see people trying to push "that language is the best!", I see people trying to have a language as the only spoken and written language in the world, and I find that incredibly sad. People shape languages, languages shape people. Seeing someone that's very comfortable with a certain programming style that's not the one that you're used too usually means that you can learn a lot by talking to them. When you look at programming as a form of communication, it's easier to understand a lot of things. You can't build your tower of Babel with thousands of people if you all talk different languages in different ways, you need something that can be understood easily by everyone. But that's also not the language you would use when writing something deeply personal.
- scns 5y agoInteresting, drawing parllels to religion here. In the end it might be our genes and the inherent tribalism driving us to behave that way, while thinking we are rational agents. There is an essay about it IIRC, the Lambda tribe and the Machine tribe.
- Zababa 5y agoTalking about things I don't really understand here, but there's a nice parallel to draw to Gödel's incompleteness theorems. Same thing with the blind men and the elephant, or 2D lizards that see a cube pass through their dimension. Maybe we're cursed to only ever see part of the truth, and only be able to understand part of it. Maybe there's no single "truth" at all and we have to learn to deal with this.
- scns 5y agoWe are not cursed, we just can't see it. Immanuel Kant called reality "Das Ding an sich", which i can try to translate as "The thing in itself". He showed, that since we perceive reality via our senses, which are easily fooled, we can never be sure that we perceive reality as it really is.
- deleted 5y ago[deleted]