[swift-evolution] [Review #2] SE-0160: Limiting @objc inference
Xiaodi Wu
xiaodi.wu at gmail.com
Sat Apr 1 04:52:47 CDT 2017
You're right, I had to re-read the proposal a few times to grasp fully the
intention there.
There was some discussion in the previous thread that this would be needed
to infer @objc for implementations of @objc protocol requirements, but I
see that this is inferred without any such annotation in this version of
the proposal, which IMO is definitely reasonable.
It seems @objcMembers is really geared towards introspection. That finally
clicked just now. Would you consider, for those of us like me who are a
little slower on the uptake, making this even more explicit in the
spelling? I'm thinking along the lines of `@introspection(objc)`, which
nicely leaves open the possibility of future introspection facilities that
don't require Objective-C. I get that "members" is meant to decribe what's
going on that's different from plain @objc, but for me it took a while to
grasp the answer to the question, "Why is this another annotation, or in
other words, when would I use this instead?"
On Fri, Mar 31, 2017 at 13:30 Douglas Gregor <dgregor at apple.com> wrote:
> On Mar 31, 2017, at 9:35 AM, Xiaodi Wu via swift-evolution <
> swift-evolution at swift.org> wrote:
>
> On Fri, Mar 31, 2017 at 10:29 AM, Chris Lattner via swift-evolution <
> swift-evolution at swift.org> wrote:
>
> Hello Swift community,
>
> The second review of "SE-0160: Limiting @objc inference" begins now and
> runs through April 2, 2017. The proposal is available here:
>
>
> https://github.com/apple/swift-evolution/blob/master/proposals/0160-objc-inference.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.
>
> *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?
>
>
> I do think this current iteration is an improvement. I have to say,
> though, that I prefer Doug Gregor's spelling of `@implicitobjc` over
> `@objcMembers`. It think the former explains the feature a little better
> and also happens to be subjectively nicer-looking.
>
>
> I think @objcMembers is more precise: it doesn’t imply that the class
> itself is @objc, just that the members are @objc.
>
> - Doug
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170401/35c61101/attachment.html>
More information about the swift-evolution
mailing list