Reducing `System` interface complexity
- Vorherrschende Sprache
- Rust
- Sterne
- 41
- Forks
- 2
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
When adding in `ResourceViews`, I was pleasantly surprised to find I didn't need to specify any extra generic parameters on `System::run()`. The system doesn't care how we get the views on resources, just that we got them. No trait bounds needed.
I suspect a similar separation could actually be made for the view iterator itself. Rather than specifying it as `resulr::Iter` with all the many generic parameters, it could instead be specified as some generic `I`, implementing `Iterator`. I believe this should work with no issues, cutting away all of the various HList indices and containments that are currently included.
This is desirable because the user shouldn't actually need to care about those parameters. They're all inferred anyway. It would be best if the user never even had to think about them, except maybe when reading documentation, since they're all internal anyway.
This needs more investigation, as I haven't actually coded anything up.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.