8. Let the function $f: \mathbf{R} \rightarrow \mathbf{R}$, satisfy $f(0)=1$, and for any $x, y \in \mathrm{R}$, there is $f(x y+1)=f(x) f(y)-f(y)-x$ +2 , then $f(x)=$ $\qquad$ .
$$
x+1
$$
8. 【Analysis and Solution】 $\because$ For $\forall x, y \in \mathrm{R}$, we have $f(x y+1)=f(x) f(y)-f(y)-x+2$,
$\therefore$ We also have $f(x y+1)=f(y) f(x)-f(x)-y+2$,
$$
\therefore f(x) f(y)-f(y)-x+2=f(y) f(x)-f(x)-y+2 \text {, }
$$

which means $f(x)+y=f(y)+x$, let $y=0$, we get $f(x)=x+1$.