On 12 Mar 2017, at 23:23, Zhao Xin <[email protected]> wrote:
> I don't see the needs to call `for domain in domains` with
> `domains:OptionSet`. If a parameter want an OptionSet, why not just
> use`domains` directly instead of `domain`?
You are right, I was writing bad code.
When working with option sets you always end up writing code like
if options.contains(flag1) {...}
if options.contains(flag2) {…}
...
No need for a for-in loop.
Please ignore my posting.
Jan E.
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users