Yes, of course.
The question is: Is an additional ?
wanted here? try? operationThatMightThrow()
is already an optional, so should the for-in loop be usable for any optional sequence without an additional ?
, or should an additional ?
be mandatory to tell the compiler that we know what we are doing (note that SE-0230: Flatten nested optionals resulting from `try?` is already implemented)? If the first is considered dangerous, then maybe the whole thing is not a good idea... At least for x in try? operationThatMightThrow() { ... }
seems more logical to me.