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

Investigate a builder interface for routers #3

Open
whitfin opened this issue Apr 5, 2019 · 0 comments
Open

Investigate a builder interface for routers #3

whitfin opened this issue Apr 5, 2019 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@whitfin
Copy link
Owner

whitfin commented Apr 5, 2019

Originally I felt this was unnecessary, but the currently implementation lends itself well to a builder as there are several advantages of a final build() call.

  • We can drop all Parser structures, because they're no longer needed.
  • We can compress all internal memory, as it's a guaranteed size (so e.g. shrink maps/vectors)`.
  • We can avoid Box<Parser> at creation time and use a generic list structure.

It also lends itself better to customization in future - the types behind the builder can be out of the public API (and documented as such). This allows us to change various types ourselves, and return a Router<_>.

@whitfin whitfin added the enhancement New feature or request label Apr 5, 2019
@whitfin whitfin added this to the 0.2 milestone Apr 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant