3 ms·
I think this is sort of correct but not entirely correct. Natural language, for instance, affords us a great many mechanisms which are very much like a function
by psygnisfive 17y ago
I think this is sort of correct but not entirely correct. Natural language, for instance, affords us a great many mechanisms which are very much like a functional programming language. For instance, rather than something like so:
for (x in men):
if john saw x:
the_man = x
break
mary knows the_man
we can do something like
mary knows men.select { |x| john saw x }
namely, relative clauses: "mary knows the man that john saw".
But relative clauses are difficult to process when they're not tail recursive (think of The House that Jack Built in English vs. Japanese, let's say).
So what it might suggest is that the brain is a functional tail-call optimized system, rather than generically imperative or generically functional. This might explain the apparent preference for imperative programming.