Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework Rc exercise #2083

Open
TheGP opened this issue Aug 14, 2024 · 4 comments
Open

Rework Rc exercise #2083

TheGP opened this issue Aug 14, 2024 · 4 comments
Assignees
Labels
A-exercises Area: Exercises C-enhancement Category: Enhancement P-high Priority: High

Comments

@TheGP
Copy link

TheGP commented Aug 14, 2024

What kind of exercise is there for Rc? There is no exercise, just some copy-paste stuff.
The same for Arc. And by the way, I didn't read anything about Arc / Cow in the book while doing smart pointers.
For lifetimes it was too simple as well.

@TheGP
Copy link
Author

TheGP commented Aug 16, 2024

I found the Arc, it is later in the book https://rust-book.cs.brown.edu/ch16-03-shared-state.html#shared-state-concurrency

@mo8it
Copy link
Contributor

mo8it commented Aug 16, 2024

I don't find this feedback constructive. I will rename the issue to focus on one point.

@mo8it mo8it changed the title Some exercises need a rework Rework Rc exercise Aug 16, 2024
@TheGP
Copy link
Author

TheGP commented Aug 17, 2024

As there are no exercises there can't be any constructive feedback either. I'm suggesting adding some exercises for Rc & Arc.

@leroivi
Copy link

leroivi commented Aug 26, 2024

I agree that the Rc exercice is not really worth. As the surrounded code treats other values exactly the same way, the pattern is way too noticeable and the learner (me) can copy/paste without understanding anything.
I think the exercice shouldn't expose the usage example on others value.
Maybe we can come up with an exercice designed around a device that needs to be unique (like Audio system).

@TheGP about LifeTime : the Readme indicates that there is a lifetimekata project that propose exercises that go deeper. I think it's good enough and allow this project to put the effort on other parts.

@mo8it mo8it added C-enhancement Category: Enhancement A-exercises Area: Exercises P-high Priority: High labels Sep 2, 2024
@mo8it mo8it self-assigned this Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-exercises Area: Exercises C-enhancement Category: Enhancement P-high Priority: High
Projects
None yet
Development

No branches or pull requests

3 participants