-
Notifications
You must be signed in to change notification settings - Fork 419
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
Return: x → [x] #615
Comments
I can see adding this as a static method on If you think that still aligns with what you had in mind then a PR would be most welcome. |
That would certainly still be nice to have. I'd prefer an extension method on any type personally, but I know there isn't anything like that in this library now. Are you worried that something like that opens a little Pandora’s box of features in this vein? As far as naming is concerned:
Looking around I might go with either I think my vote would be for |
Yes, that's a big part of it besides being out of scope and having the potential to introduce conflicts. If someone wants an extension method, it's a one-liner to add to their project locally.
That's singleton as an OOP design pattern. I suggested
I suggested
While |
No insistence here! I'm totally fine with |
I'm assuming you'll be submitting a PR next? I am getting the next version (3.3) ready to ship soon. I was hoping for yesterday but I missed that deadline as other things took priority. I have now deferred the release to Monday of the week after next. No one's holding a gun to these dates but it gives a goal and some focus. Do you think we can get this into that release or would you need more time? |
I think I can manage that. Let me give it a go and we'll see how far off the mark the PR is. |
Awesome & looking forward. |
Hey can you elaborate a little on what you meant by "to trigger optimizations"? Which optimizations are we trying to get specifically? |
Sure. What I mean is that if someone composes with Have a look at commits with the word “optimize” for examples how some of the extensions in MoreLINQ are optimised under certain conditions (including type checks), with the most recent one just being from a couple of days ago. |
Gotcha. So is there any reason not to have this method return an IEnumerable that is actually just a single element List? That seems to be the simplest way of satisfying the requirements for the optimizations. |
Absolutely except it has to be sufficiently different than just conjuring up an an array of one element (e.g. |
I'd like an extension method that takes an object and converts it into a single element as discussed here.
It's not linq per se, but it seems to fit nicely with the spirit of this library. I'd be happy to provide a PR if you think it fits.
The text was updated successfully, but these errors were encountered: