2 ms·
I have to agree. I never liked the comma operator, even in C. It's that kind of thing that "looks nice" at first but it is confusing in the end. It's not synta
by raverbashing 6y ago
I have to agree.
I never liked the comma operator, even in C. It's that kind of thing that "looks nice" at first but it is confusing in the end. It's not syntactic sugar, it's syntactic raisins.
v += [1, 2, 3, 4, 5] makes sense to me
or, for a less ambiguous meaning
v.extend([1, 2, 3, 4, 5]);
is just fine.
I don't think it makes sense to view comma as an operator.
- gpderetta 6y agoToday you can use initilizer list to support this syntax: V+={1,2,3,4,5};