Skip to content

fix: move_semantics5 hints#762

Merged
manyinsects merged 2 commits intorust-lang:mainfrom
tlyu:move-semantics5-fixes
May 23, 2021
Merged

fix: move_semantics5 hints#762
manyinsects merged 2 commits intorust-lang:mainfrom
tlyu:move-semantics5-fixes

Conversation

@tlyu
Copy link
Copy Markdown
Contributor

@tlyu tlyu commented May 23, 2021

Improve hints and comments for move_semantics5 based on repeated instances of people expressing confusion about this exercise on Discord.

tlyu added 2 commits May 22, 2021 21:56
Improve the hints for move_semantics5, as well as the explanatory
comments in the code.

Previously, it was not clear what possible changes were allowed.
It seems that reordering the statements might be the intended solution.
The previous comment about not "adding newlines" doesn't make sense,
so treating it as "adding new lines" makes it more clear.
@manyinsects manyinsects merged commit a2f0401 into rust-lang:main May 23, 2021
@tlyu tlyu deleted the move-semantics5-fixes branch May 25, 2021 22:35
@dtaralla
Copy link
Copy Markdown

Personally, me and some colleagues had a lot of troubles on this exercise, even though we do understand the concept of overlapping scopes. What we missed was actually in the problem statement.

The comments are still confusing - to us, the "or changing any of the lines" part entailed that we couldn't reorder them either. The exercise seems more focused on "thinking outside of the box" and discover that "AHAH! But they didn't say we can't REORDER!" than actually learning something about overlapping scopes.
Could we maybe just say something like "Make me compile by ONLY reordering lines in main."?

@manyinsects
Copy link
Copy Markdown
Member

@dtaralla Yes, that seems like a good way to phrase the instructions for this exercise, and a fun little challenge at the same time. Thanks for the suggestion, I'll commit this on main.

@manyinsects
Copy link
Copy Markdown
Member

Fixed (again) in df25684.

ppp3 pushed a commit to ppp3/rustlings that referenced this pull request May 23, 2022
dmoore04 pushed a commit to dmoore04/rustlings that referenced this pull request Sep 11, 2022
Carefully reason about the range in which each mutable reference is in
vogue. Does updating the value of referrent (x) immediately after the
mutable reference is taken helps? Read more about 'Mutable Referenes'
vogue. Does it help to update the value of referent (x) immediately after
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1974 gets rid of referent altogether because it doesn't seem to help the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants