Highly positive. The proposal fills an important gap in language usability and expressivity.
Yes. While it's true that there are means to get the same behavior via local throwing functions, that approach isn't neither scalable nor intuitive. E.g., nested and labeled for loops involving continue <label>
or break <label>
statements aren't easily convertible to repeated invocations of throwing functions and there's no guarantee that those abstractions can be optimized by the compiler.
Yes, it does. I would hardly think of an alternative syntax better that the one proposed.
Python is the first language which comes to mind. You can use for...in
loops with both lists and tuples:
for x in [1, 2, 3, 4, 5]:
print(x)
for y in (1, 2, 3, 4, 5):
print(y)
With this proposal and in a future in which concrete tuples can be implicitly converted to tuples of value packs, users may transition more easily from Python to Swift.
A quick reading, but accurate enough to notice some cpp left-overs