[swift-evolution] [Review] SE-0185 - Synthesizing Equatable and Hashable conformance
Xiaodi Wu
xiaodi.wu at gmail.com
Wed Aug 9 18:35:45 CDT 2017
On Wed, Aug 9, 2017 at 6:08 PM, Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:
> Hello Swift community,
>
> The review of SE-0185 - "Synthesizing Equatable and Hashable conformance"
> begins now and runs through August 15, 2017. The proposal is available here:
> https://github.com/apple/swift-evolution/blob/master/
> proposals/0185-synthesize-equatable-hashable.md
>
>
> Reviews are an important part of the Swift evolution process. All reviews
> should be sent to the swift-evolution mailing list at:
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
> or, if you would like to keep your feedback private, directly to the
> review manager. When replying, please try to keep the proposal link at the
> top of the message:
>
> What goes into a review?
>
> The goal of the review process is to improve the proposal under review
> through constructive criticism and, eventually, determine the direction of
> Swift. When writing your review, here are some questions you might want to
> answer in your review:
>
> • What is your evaluation of the proposal?
>
Brilliant. However, I believe that this is a typo of some importance to
clarify:
> The compiler synthesizes P's requirements for a struct with one or more
stored properties if and only if all of the types of all of its stored
properties conform to P.
I think the author means to write "...conform to {Equatable | Hashable}";
it is unclear what it means for a struct P to have stored properties that
"conform to P" (which would be an odd restriction in any case). The same
issue occurs in preceding bulleted list with respect to enums.
> • Is the problem being addressed significant enough to warrant a
> change to Swift?
>
This is a wonderful addition.
> • Does this proposal fit well with the feel and direction of Swift?
>
Yes, the author did an excellent job paralleling the existing rules for
Codable synthesis; I agree fully with that approach as it makes this
feature more easily learnable and predictable for all users.
> • If you have used other languages or libraries with a similar
> feature, how do you feel that this proposal compares to those?
>
I haven't in recent times, but I do know that other languages do this.
> • How much effort did you put into your review? A glance, a quick
> reading, or an in-depth study?
>
A quick reading today; an in-depth study previously.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170809/bf1a08f2/attachment.html>
More information about the swift-evolution
mailing list