Collection Expressions: Do not require [ ] when there is only one item in the expression and it is a collection #8441
Unanswered
TonyValenti
asked this question in
Language Ideas
Replies: 1 comment 3 replies
-
Not sure I agree. I'd start by thinking about spreading tuples first: M(.. tuple1, .. tuple2); // Same as M(tuple1.A, tuple1.B, tuple2.A, tuple1.B); Compared to: M((.. tuple 1, .. tuple 2)); // Same as M((tuple1.A, tuple1.B, tuple2.A, tuple1.B));` If womples existed, the same thing would hold. These two syntaxes would mean different things: M(.. tuple);
M((.. tuple,)); I have the same intuition that |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be really nice to simply be able to type:
instead of:
Beta Was this translation helpful? Give feedback.
All reactions