Obviously the following two functions bring the same results:
r = Sqrt[x^2 + y^2];
fr[x_, y_] := Sqrt[x^2 + y^2];
Table[r, {x, 0, 1, .25}, {y, 0, 1, .25}]
Table[fr[x, y], {x, 0, 1, .25}, {y, 0, 1, .25}]
What are the programming specific advantages of one function compared to the other?
Table[r, {x, 0, 1, .25}, {y, 0, 1, .25}]"obviously" produced the same result as the table withfr[x,y]. The fact that the table withrworks is only because of very specific internals of howTableworks. The form withfrshould be considered to be the normal way to define a function andrshould be considered to be a mathematical formula. – Sjoerd Smit Aug 15 '17 at 10:15