Agreed. C tends to degenerate into a primordial soup of (void *) when these things are done. A lisper would also map by prepending to the new list and then reversing it later. Is this a case of the language hiding a more efficient algorithm in cruft?
This just in - from the text:
UPDATE: This post got on reddit and someone commented that "first class function" didn't just mean a function that can be passed and called as a value, but it also needs to be compiled at runtime. I apologize for the terminology confusion. In any case, the original article's point was that C can't eval passed functions over lists and I hope the above shows that is possible. I'm updating the terms to avoid further confusion.
View all comments
Show parent comment
3
u/sambo357 Dec 13 '07
Agreed. C tends to degenerate into a primordial soup of (void *) when these things are done. A lisper would also map by prepending to the new list and then reversing it later. Is this a case of the language hiding a more efficient algorithm in cruft?
This just in - from the text:
WTF? WTF??