Most textbooks I've seen (and teachers I've met, myself included) are rather careless about the distinction between variables and functions.
For example, when we write $y=f(x)$ we all know that $f$ is the function, while $x$ and $y$ are variables. We also know that $y\neq f$. Still, we go on to call $y$ a function of $x$ in front of students, even though $y$ is not a function in the mathematical sense.
The terminology "$y$ is a function of $x$" has a long tradition that seems to predate the moment when people decided to also call $f$ a function. So there is no hope of changing this. In principle there is also no need of changing terminology, if we all agree never to call $f$ "a function of $x$" nor $y$ "a function".
Unfortunately, people soon drop the "...of $x$" and call $f(x)$ a function, they call $x^2$ a function and they call the temperature a function. Or they write $y(1)$ and $df/dx$, even though the first one is meaningless when $y$ is a variable, while the second would probably be zero in most cases, since $f$ does not depend on $x$. In many applied areas it is common to go as far as writing $y=y(x)$, completely blurring the difference between the function and the dependent variable. Here is a nice example from Dray and Manogue that illustrates the effect this can have (click "Next").
When I'm teaching introductory calculus to engineers and see their difficulties with function application notation, composition of functions and the chain rule, I sometimes wonder how much of that is caused by this constant blurring of notions by the teachers.
Question: Is there any research in mathematics education that tries to measure the effect the common blurring between functions and variables has on students, while they are learning the concept of a function?