-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
GUI Exercise is more about text formatting than trait objects #1617
Comments
I agree... even though I love making this kind of formatting myself, it's not the right focus for this exercise. |
Per #1516, this is a little too early for trait objects anyway, so let's think of something that just requires traits. |
I think the simplest will be something where generics are used to support dependency injection. Something like
|
Unfortunately, the modules segment depends on this one, suggesting breaking it up into modules. Maybe that's OK? Maybe the exercise for that segment is "here's some code you haven't seen before, put it into modules" instead of "here's some code you worked on yesterday, .."? Being able to read Rust code is a good skill to practice, and that's probably a good segment to practice it in.. |
This should be a bit simpler, and notably * does not require trait objects, which per #1516 should be moved later in the course * does not require a lot of futzing with string formatting But all that hard work developing the GUI exercise is not for naught: it remains in the "Modules" segment, where students will get a chance to read some Rust code and reorganize it a little bit. Fixes #1617. R=mgeisler as the original author of the GUI exercise.
This is from feedback in #1565. It is in the "Methods and Traits" segment, so it doesn't necessarily need to focus on trait objects. But, something nifty with traits would be good.
I've not come up with a great idea yet. The best I've got is some kind of signal-processing DAG, like old-school analog synthesizers. So you'd have a few types that take
dyn SignalSource
trait objects, and themselves implementSignalSource
. But, signal processing is a little complex for an example!I'm open to ideas here!
The text was updated successfully, but these errors were encountered: