[swift-evolution] [Accepted] SE-0121: Remove Optional Comparison Operators

Johannes Neubauer neubauer at kingsware.de
Tue Aug 30 04:47:16 CDT 2016

Johannes Neubauer

Von meinem iPad gesendet
> Am 30.08.2016 um 08:43 schrieb Goffredo Marocchi via swift-evolution <swift-evolution at swift.org>:
> The problem is, if I have to reimplement this thing in every single project I touch, that's a huge impact. I shouldn't have to copy & paste a bunch of code into every single project. I'm already doing this with my replace(_:with:) function that you guys (Swift core team; I forget exactly who) didn't like, but that's at least simpler than the Optional comparison operators, and is only one function (and it's easier to work around the lack of this function if I don't want to reimplement it for a particular use).

Swift has a package manager, wouldn't it be possible to just implement these operators in a package/module and import it in all your projects? I didn't try it but public operators are possible aren't they? Copy&paste should not be the solution.

All the best

More information about the swift-evolution mailing list