8. Let the function $f: \mathbf{R} \rightarrow \mathbf{R}$, satisfy $f(0)=1$, and for any $x, y$ $\in \mathbf{R}$, there is $f(x y+1)=f(x) f(y)-f(y)-x+2$. Then $f(x)=$ $\qquad$ .
$$
\text { 8. } x+1 \text {. }
$$

For any $x, y \in \mathbf{R}$, we have
$$
\begin{array}{l}
f(x y+1)=f(x) f(y)-f(y)-x+2, \\
f(x y+1)=f(y) f(x)-f(x)-y+2 .
\end{array}
$$
$$
\begin{array}{l} 
\text { Hence } f(x) f(y)-f(y)-x+2 \\
=f(y) f(x)-f(x)-y+2,
\end{array}
$$

which simplifies to
$$
\begin{array}{l}
f(x)+y=f(y)+x . \\
\text { Let } y=0 \text {, we get } f(x)=x+1 .
\end{array}
$$