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

Consider type erasure to bring back generic Rng #7

Open
dyedgreen opened this issue Mar 6, 2021 · 0 comments
Open

Consider type erasure to bring back generic Rng #7

dyedgreen opened this issue Mar 6, 2021 · 0 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@dyedgreen
Copy link
Owner

dyedgreen commented Mar 6, 2021

Blog post on the technique: https://www.possiblerust.com/pattern/3-things-to-try-when-you-can-t-make-a-trait-object

pros:

  • get back the pr_with method

cons:

  • need to do more dynamic dispatch which is potential expensive
@dyedgreen dyedgreen added enhancement New feature or request question Further information is requested labels Mar 6, 2021
@dyedgreen dyedgreen self-assigned this Mar 6, 2021
@dyedgreen dyedgreen changed the title Use type erasure to bring back generic Rng Consider type erasure to bring back generic Rng Mar 6, 2021
@dyedgreen dyedgreen added help wanted Extra attention is needed and removed enhancement New feature or request labels Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant