# Why does With return a temporary symbol? [duplicate]

Why does

With[{x0 = 1, y0 = 2},
f[x_] = a + b x /. First[
Solve[{y0 == a + b x0, b == 0.1}, {a, b}]]]


evaluate to

1.9 + 0.1 x\$


1.9 + 0.1 x


?

## marked as duplicate by Simon Woods, b3m2a1, m_goldberg, Community♦Dec 21 '17 at 18:11

• See the Details on With and this comment by jkuczm. It's the expected behavior. – b3m2a1 Dec 21 '17 at 15:24
• note that f gets defined as intended. Only the return value of with is odd and you can hide it with a semicolon. – george2079 Dec 21 '17 at 15:38
• I think that in the Details section of the documentation, the relevant entry is about nested With statements which is obviously not the case here. Similarly, the linked comment verifies that it's not clear when renaming occurs in nested statements. I think that one seemingly relevant example in section Properties & Relations (the last one) is actually not relevant here; same applies for the examples in the Possible Issues section – user42582 Dec 21 '17 at 15:41
• @user42582 With doesn't care whether the scoping construct is With or a function definition. It's all the same thing (lexical rescoping). – b3m2a1 Dec 21 '17 at 16:50