fix: move_semantics5 hints#762
Conversation
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.
|
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. |
|
@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 |
|
Fixed (again) in df25684. |
fix: move_semantics5 hints
fix: move_semantics5 hints
| 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 |
There was a problem hiding this comment.
#1974 gets rid of referent altogether because it doesn't seem to help the explanation.
Improve hints and comments for move_semantics5 based on repeated instances of people expressing confusion about this exercise on Discord.