[swift-evolution] PITCH: New :== operator for generic constraints

Charles Srstka cocoadev at charlessoft.com
Tue Aug 16 17:19:16 CDT 2016


> On Aug 16, 2016, at 5:13 PM, David Sweeris <davesweeris at mac.com> wrote:
> 
> Any proposal that expands the power of generic programming gets an almost automatic +1 from me.
> 
> I can't think of any circumstances in which I wouldn't want to use ":==" instead of ":". Are there any downsides to expanding ":" to mean what ":==" does?
> 
> Incidentally, I kinda thought things either already worked like this, or would work like this after generics were "completed", but I can't tell you why I thought that.

Me neither, but the last time I proposed that, people stated that there were some cases where this could not work. No concrete examples were given, but I assume it probably has something to do with associated type wackiness. :== seems like a workable compromise to me.

https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/019510.html <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/019510.html>

Charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160816/ea03a45d/attachment.html>


More information about the swift-evolution mailing list