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 extension methods #6

Open
ndsvw opened this issue Jul 11, 2021 · 0 comments
Open

Consider extension methods #6

ndsvw opened this issue Jul 11, 2021 · 0 comments
Labels
help wanted Extra attention is needed idea

Comments

@ndsvw
Copy link
Owner

ndsvw commented Jul 11, 2021

  • How much effort is it?
  • is it worth it?
  • does the project name "Fluent-Random-Picker" still make sense?
    • Can extension methods for all this be built without fluent syntax?
    • Does the extension method syntax still look like the code that already exists?

Extension methods could exist for IEnumerable:

new List<int>{ 1, 2, 3}.PickOne(); // but where can you set the RNG?
new List<int>{ 1, 2, 3}.PickOne().WithSettings(rng).Evaluate(); // but then, the PickOne() logic is different to the PickOne() from the normal syntax
@ndsvw ndsvw added idea help wanted Extra attention is needed labels Jul 11, 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 idea
Projects
None yet
Development

No branches or pull requests

1 participant