Extended Usage of the ..
Operator
#9371
Unanswered
naratteu
asked this question in
Language Ideas
Replies: 2 comments
-
It might also be nice to combine the collection expression itself with yield. - foreach (var b in end) yield return b;
+ yield return [..end]; - yield return 1;
- yield return 2;
- yield return 3;
- foreach (var b in end) yield return b;
+ yield return [1,2,3,..end]; |
Beta Was this translation helpful? Give feedback.
0 replies
-
The syntax isn't the problem, it's the implicit quadratic nature of such an operation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
..
operator is currently used in the following ways:I believe the
..
operator could be extended to support additional use cases. For example:This idea is purely from the perspective of a user, so I’m not sure how complex it would be to implement this feature or what issues might arise if it were implemented. I would appreciate your feedback. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions