[swift-evolution] Proposals: (1) Forbidding custom `==` for value types, (2) `dispatch` keyword, (3) `default`-result for methods with `Self`, and (4) Poor-Mans-Existentials
Tony Allevato
allevato at google.com
Tue Jul 19 11:10:26 CDT 2016
On Tue, Jul 19, 2016 at 9:00 AM Félix Cloutier <swift-evolution at swift.org>
wrote:
>
> Here's one way this could be implemented: if you write `struct Foo:
> Equatable` without implementing a `func ==`, the compiler makes one for
> you. Done.
>
I floated a draft proposal a while back that addressed exactly this use
case:
https://gist.github.com/allevato/2fd10290bfa84accfbe977d8ac07daad
It's purely additive so it's effectively shelved till post-Swift-3, and
there are still some issues up for debate (the discussion thread was here <
http://thread.gmane.org/gmane.comp.lang.swift.evolution/18495>), but it
would likely address many of these concerns without going to the extreme of
forbidding explicit implementation of Equatable or the other suggestions
offered here (which I wouldn't support).
> Félix
>
> _______________________________________________
> 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/20160719/8960b9ba/attachment.html>
More information about the swift-evolution
mailing list