Anders429 / Anders429/brood

Reducing `System` interface complexity

Offen
#188 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
A - Systems C - Usability P - Low S - Needs Investigation V - Major Breaking Change
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.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.