[swift-dev] Swift 2.2 review request: SE-0022 #selector implementation

Douglas Gregor dgregor at apple.com
Thu Jan 28 18:17:47 CST 2016


> On Jan 28, 2016, at 3:48 PM, Jordan Rose <jordan_rose at apple.com> wrote:
> 
>> 
>> On Jan 28, 2016, at 12:12, Douglas Gregor via swift-dev <swift-dev at swift.org <mailto:swift-dev at swift.org>> wrote:
>> 
>> Hi all,
>> 
>> I’ve finished the implementation of SE-0022, the #selector expression. Part of that proposal is the deprecation of the use of string literals to form Selectors, which is something we would like to do in Swift 2.2 (so that we can remove it outright in Swift 3).
>> 
>> However, it’s a non-trivial set of changes, and I’d like review of the corresponding commits before pulling it into the branch. The commits are:
>> 
>> 	https://github.com/apple/swift/commit/dccf3155f1fe5400df0c9b51f21a3b8f7fa09b9c <https://github.com/apple/swift/commit/dccf3155f1fe5400df0c9b51f21a3b8f7fa09b9c> (Jordan reviewed this)
>> 	https://github.com/apple/swift/commit/7c0e087cd514c926d9eaa3082679edff626effc8 <https://github.com/apple/swift/commit/7c0e087cd514c926d9eaa3082679edff626effc8>
>> 	https://github.com/apple/swift/commit/89834f8d5fcce652401ecaeec4addace48cb2fae
>> 	https://github.com/apple/swift/commit/f7407f6a4d2c9b20ef1d2aab6dbaff5f9419aa88
>> 	https://github.com/apple/swift/commit/00313a1e7ec4934a1df12541b9a8f2683f28ed67
>> 	https://github.com/apple/swift/commit/1a830fa541705594bd4b3936de24a20b5b943059  (Jordan reviewed this)
>> 	https://github.com/apple/swift/commit/2a42664129d7e95d182a91858fb268e50373b68b
>> 	https://github.com/apple/swift/commit/37441e1b46cd97d42161455dd712d17ce2ccfe87
>> 	https://github.com/apple/swift/commit/0a359424d7d5bd31c9e7a2f98c15cd9a1fa40328
>> 	https://github.com/apple/swift/commit/9a0241bb3bcdde3531d0ba683e8d6668c50c9f58
> 
> I reviewed all of these except
> 
> https://github.com/apple/swift/commit/89834f8d5fcce652401ecaeec4addace48cb2fae <https://github.com/apple/swift/commit/89834f8d5fcce652401ecaeec4addace48cb2fae> (IRGen)
> https://github.com/apple/swift/commit/f7407f6a4d2c9b20ef1d2aab6dbaff5f9419aa88 <https://github.com/apple/swift/commit/f7407f6a4d2c9b20ef1d2aab6dbaff5f9419aa88> (SILGen)
> 
> I will say I'm not happy that we don't have any real code completion or IDE support. That seems important for putting it into a release.

The code completion we have is just filling in the “selector(@objc method)” after “#” in expression contexts, which is very weak. There are two things we want:

	* Better code completion in general for compound names, e.g., after “UIView.”, we probably want to see (or have some easy way to get to) the compound name “insertSubview(_:aboveSubview:)”. That’s really SE-0021 not having good code completion.
	* Within #selector(…), we want to see compound names as the primary completions after a type name, and limit to @objc methods.

	- Doug


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160128/e18abf9e/attachment.html>


More information about the swift-dev mailing list