5 ms·
This is incorrect. People are born with an innate biological bias towards C like syntax OVER ML syntax or even FP syntax. It's easy to prove this fact with som
by kilgnad 4y ago
This is incorrect. People are born with an innate biological bias towards C like syntax OVER ML syntax or even FP syntax.
It's easy to prove this fact with some natural example outside of programming.
Let's say I have several tasks I need you to do. If I wanted to present those tasks to you in written form, what would those tasks look like?
They would look like a series of procedures. Any human would present imperative instructions to you WITHOUT being taught anything beforehand. Nobody is going to put those tasks into a single run on sentence because that's less intuitive to us.
Additionally if I want you to repeat a task I'm not going to write something self referential. I just say repeat this task four times or something. We communicate this way through language and through writing, so OF COURSE c like syntax is more natural.
(for those who didn't pick up on it, I'm referring to function composition and recursion respectively in the examples I just gave.)
You got it backwards. The industry teaches C-like syntax because that syntax is naturally more intuitive. This is despite the fact that in the long run FP-syntax is overall better.
- satvikpendem 4y agoSure, I'll agree with that. Imperative code is simply more natural for people.
- bmitc 4y ago> People are born with an innate biological bias towards C like syntax OVER ML syntax or even FP syntax. Are there some studies that back that up? My wife took the How to Code course on edX, and the use of Racket was a non-issue. The use of it was quite literally transparent. The issue is that humans react to something foreign with huge amounts of bias. So if I person has any introduction at all to some form of a C-type of language, it seems to shut down all forms of curiosity, generally speaking. I honestly wonder if that has been studied. I was first taught C, Python, and Java, and was totally uninterested in programming. Once I found functional-first and visual dataflow languages, I was hooked. I'm generally curious what C and Python people think when they learn something like Prolog? Do they exclaim "this isn't hard enough?".
- kilgnad 4y ago>Are there some studies that back that up? My wife took the How to Code course on edX, and the use of Racket was a non-issue. The use of it was quite literally transparent. There's no studies. It's like asking for a study about how people tend to smile when they're happy. Do you really need a study for something so obvious? Do you go around the world thinking nothing is true or real unless someone spent money on some sort of quantitative analysis? If you read the rest of my post you'll see that what I stated follows from logic. When we have a series of tasks we want written down, we automatically write it down via a list of imperative procedures. This is done automatically. We haven't taken any TODO list writing lessons or anything before hand we just do it procedurally meaning we're born to do it this way. It's innate. This is the obvious default. And thus as a result any programming language similar to that default will be more intuitive. As for your wife, who's to say procedural programming is not easier? She may have found racket easy but that doesn't mean she wouldn't find imperative languages far more intuitive.
- ModernMech 4y ago> People are born with an innate biological bias towards C like syntax OVER ML syntax or even FP syntax. I disagree with this, as most people do not use any of these languages. Excel is by far the most popular programming language, and it's a mostly-functional, reactive, lisp-style language. That's very far from C, and the closest we have to end-user programming. So if anything, the evidence says that people have an innate biological bias toward Excel-style programming; whereas we, the small fraction of a fraction of people who can program in C, are the weird ones.
- kilgnad 4y agoWrong. Excel is biased towards familiarity with mathematics. It just builds on our pre-existing familiarity with mathematical formulas. The intended usage is ALSO just for matehmatical formula calculations. Excel is not typically used to execute step by step procedures across IO. To analyze our innate biological biases you must remove all context of mathematics and programming and just frame it from the context of a typical activity: What do you get when you ask someone to write down a series of tasks? you get a list of imperative instructions. This happens without ANY additional learning or education. For excel you need to be taught excel and there's a per-requisite of already being familiar with basic mathematical language. I mean honestly this is all obvious to me. I can come at it from another angle to help you see why it's so obvious. What type of universe are humans designed to live in? We live in a universe that moves forward in time, with each change in incremental step forward in time comes changes in the properties of things around us. State changes and mutations. Our brains are tuned to live in this type of state changing universe ALONG with being state changing entities that are an intrinsic part of the universe itself. Logically a programming style that imitates how the universe, and how our minds work will be MUCH more intuitive. What sort of universe is functional programming? It's a place where time doesn't exist, state changes don't occur. This universe is actually impossible to exist. Think about it. You know about von neumann machines right? Can you build a lambda calculus machine where no imperative instruction ever occurs? No it's impossible. In order to even simulate this universe we need access to the time domain to execute an evaluation step. Theoretically if you build some sort of adder that can add 50 values at the same time you can have a 50 operation FP program evaled in one step. Practically speaking the evaluation must happen in several steps because adders only add a couple values at a time then save it to memory. We only know time doesn't exist in the FP world is because these equations can be evaluated in different orders. That's why haskell can do lazy evaluation. Basically functional programming is a sort of clever fantasy universe we made up. We aren't biologically tuned to operate or even analyze such a universe. We have to take extra steps in imagination to make sense of it. It is NOT intuitive.