Y
Hacker News
new
|
ask
|
show
|
jobs
by
iainmerrick
773 days ago
While in Rust I can assign string to foo and then update it with int
When do you need to do that? Can you give an example?
1 comments
steveklabnik
773 days ago
I suspect they're talking about shadowing. You can't change the type of an existing variable, but you can create a new variable with the same name but a different type.
link