4 ms·
Functional programming isn’t how people think, and it isn’t how computers work. Therefore it’s a bad way for the two to communicate.
by pansa2 5y ago
Functional programming isn’t how people think, and it isn’t how computers work. Therefore it’s a bad way for the two to communicate.
- theCodeStig 5y agoThat’s a strong assertion. Can you elaborate, to back it up?
- tbrownaw 5y agoWhich part needs to be somehow backed up? That the programming paradigm that's used primarily by a small number of people who are into mathematical purity and is generally regarded as hard to wrap your head around, isn't how people think? That the programming paradigm that takes so hard to not expose concepts like RAM or a program counter isn't how computers think? Or that the combination of these makes it unsuitable for communication between the two?
- dnautics 5y ago> That the programming paradigm that takes so hard to not expose concepts like RAM or a program counter isn't how computers think? Are you somehow under the mistaken impression that OOP does this? What happens in C++ when you have exhausted the heap and you try to new() an object? Have you ever done pointer arithmetic in Java?
- onion2k 5y agoIs there a programming model that meets the criteria of "how people think"?
- dnautics 5y agoFunctional programming. You don't have to have a long memory attention span to understand how you data are changing. It's the case that humans can only keep some small number of things in their head, no?
- pjc50 5y agoI'm very much of the opinion that you're not going to find a single answer to "how people think". It's unobservable and not really subject to social pressure, so there's going to be a huge variance in mental models. That's why you get these unproductive discussions about which is best. It's like having some red-green-colorblind people and some blue-yellow-colorblind people try to agree on wallpaper for you.
- TeMPOraL 5y ago> It's like having some red-green-colorblind people and some blue-yellow-colorblind people try to agree on wallpaper for you. I agree, it's exactly like that. It's like that one person you're annoyed with because they keep saying the colors don't match, even though they obviously do, but you don't know that person is tetrachromatic - you don't even know tetrachromacy is a thing. Or, "picture this in your mind" meaning something completely different to people with aphantasia (like myself), and most people with and without it are not even aware aphantasia is a thing, and just assume everyone imagines (or doesn't) the world the way they do. Same thing with internal monologue - some people talk to themselves in their heads all the time (I'm in this group), others don't, and - again - most aren't aware there are people who aren't like them. The more we talk and learn about each other, the more it seems our internal experiences are pretty diverse.
- mcintyre1994 5y agoBefore I learned about functional programming I found that I'd break a task down until I found a pure functional core that transformed data from one form to another. I'd try to separate that from all the imperative and async stuff going on, and all the validation. It sometimes meant my Python programmes looked a bit weird, but I found that when I managed to do that I'd reached a point where I really understood the problem space and what I was trying to do. Unsurprisingly when I learned functional programming I found that it was a great match for the way I think, or at least the big picture way I approach programming. I doubt it's how all programmers think, but it's definitely the way I do.