You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the very least I'd suggest elaborating on what's expected. Of course the hint has it, but for those who don't want to go for hints 🙂 it would be helpful to clarify that what the exercise wants is to preserve the println! lines as-is too, i.e., to have that number + 2 piece intact.
@[email protected]: variables5 seems like cheating
I understand the concept of shadowing, but this example seems forced.
No, I didn't think of the solution at first and needed hint (and then felt like I was cheated)
@[email protected]:
Well, looking at it, it gets the idea across of shadowing, it's just a not-immediately-visibly-evident way of teaching it to what I would consider good teaching technique
The compiler also isn't quite lending much help, that actually may be considered a bug!
First of all thanks for all the time and effort that's gone into rustlings, I'm finding it an excellent learning tool alongside the Rust book.
This is the first exercise that I found jarring whilst working through them.
The spelling of a number in a string felt like a distraction, for me.
For this issue, could the use of an inner and outer scope with {} help illuminate that we're looking for name shadowing specifically in this exercise? Without having to resort to the hint, I mean.
It teaches about shadowing, which is not really useful if used like this (nor is it appropriate at this point in the curriculum).
The text was updated successfully, but these errors were encountered: