Claims 1 and 2 are false on their face, because (as you point out yourself) the execution is equivalent.
You don't typically need to control order of application of the function to the items, which is why it's fast. You do of course need to control order of function application, but with function syntax it's all the more clear.
Optimization meanwhile is the same, except for the most degenerate of examples such as "we hand-crafted the machine code of this operator for this one case".
But a typical implementation of combining two arrays in all permutations would be something like
permute(NIL, a, b)
so the compiler can see that there's no action required but to combine them, and it's a trivial matter to parallelize the combination across N cores or computers. Indeed there were functional compilers capable of fully optimizing this problem in the early 90s.
As for item 3 I will have to say that I doubt you are right, but I cannot claim either way since there is of course no evidence presented, and probably no research.
I do find infix to be pleasant for colloquial, familiar expressions. I find it to be personally extremely counterproductive for comprehension with unusual constructions.
Posted Feb 13, 2013 20:26 UTC (Wed) by raiph (guest, #89283)
[Link]
> Claims 1 and 2 are false on their face, because (as you point out yourself) the execution is equivalent.
Heh. It appears you didn't interpret the word "appear" as I intended...
> You do of course need to control order of function application, but with function syntax it's all the more clear.
So, is it concat(cross(@a,@b)) or cross(concat(@a,@b)), or something else, and what is the result?
> Optimization meanwhile is the same, except for the most degenerate of examples such as "we hand-crafted the machine code of this operator for this one case".
Are you suggesting it's degenerate to specifically atomically optimize a crosswise concatenate?
> As for [understanding a+b uses a different part of our brain than add(a,b)] I will have to say that I doubt you are right, but I cannot claim either way since there is of course no evidence presented, and probably no research.
I'd be surprised if there was no research but my own investigations have been of brain science as it relates to natural language, not computer languages. The "aiui" was partly because I've taken Larry's word (he was a linguist) that similar principles apply. I hope to dig in to this this weekend and post back here, with a focus on comparing add(a,b) and a + b.
> I do find infix to be pleasant for colloquial, familiar expressions.
I'm going to assume here you mean in computer languages. As in, you find a + b in computer code pleasant.
For me @a X @b ("array a crossed with array b") felt natural and pleasant as did @a X~ @b ("array a cross concatenated with array b").
> I find it to be personally extremely counterproductive for comprehension with unusual constructions.
So a+b works well instead of add(a,b) but a**b fails compared to power(a,b) (or something like that)?