I\'ve been watching this MSDN video with Brian Beckman and I\'d like to better understand something he says:
Every imperitive programmer goes through this
Brian just has showed that functions are data too. Functions in general are just a mapping of one set to another: y = f(x)
is mapping of set {x} to set {y}: f:X->Y
. The tables are mappings as well: [x1, x2, ..., xn] -> [y1, y2, ..., yn]
.
If function operates on finite set (this is the case in programming) then it's can be replaced with a table which represents that mapping. As Brian mentioned every imperative programmer goes through this phase of understanding that the functions can be replaced with the table lookups just for performance reason.
But it doesn't mean that all functions easily can or should be replaced with the tables. It only means that you theoretically can do that for every function. So the conclusion would be that the functions are data because tables are (in the context of programming of course).