[swift-evolution] Proposal: Python's "in" and "not in" syntactic sugar
Krzysztof Siejkowski
krzysztof at siejkowski.net
Thu Dec 17 09:07:59 CST 2015
Most programmers would probably love using them though.
Myself, I’d not love using them. I also don’t like them in Python.
But not to dismiss the idea on personal merits, could you please elaborate on the details of „in” and „not in” usage?
1) What types could they be used with? SequenceType? Array? Dictionary? Set? Optional?
2) Should their usage be extensible to any type? Will there be a possibility for a type Foo to participate in?
```
let foo = Foo()
if bar in foo {}
if bar not in foo {}
```
3) Will the operators be usable only in `if` statement? What about case, where clauses etc?
Krzysztof
>
> --
> Brent Royal-Gordon
> Architechies
>
_______________________________________________
swift-evolution mailing list
swift-evolution at swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151217/4a133987/attachment-0001.html>
More information about the swift-evolution
mailing list