[swift-evolution] [Pitch] Build configuration tests

Erica Sadun erica at ericasadun.com
Tue Apr 25 13:54:48 CDT 2017


> On Apr 24, 2017, at 7:59 PM, Ben Rimmington <me at benrimmington.com> wrote:
> 
> 
>> On 24 Apr 2017, at 21:07, Erica Sadun wrote:
>> 
>> I'm going to throw this back out into the SE arena to see if there's still interest in these. 
>> 
>> https://github.com/apple/swift-evolution/pull/369
>> 
>> It seems to me that many of these are already incorporated into the language as private calls, and would only need minimal coding. Given the extremely limited timeline and the high volume of list traffic, I'm looking for specific concerns (or benefits) you see in this pitch.
> 
> Instead of:
> 
> 	```swift
> 	#if interop(objc)
> 	    // Code that depends on Objective-C
> 	#endif
> 	```
> 
> Would the following be equivalent?
> 
> 	```swift
> 	#if canImport(ObjectiveC)
> 	    // Code that depends on Objective-C
> 	#endif
> 	```
> 
> Could the `canImport(ObjectiveC)` test also replace the `vendor(Apple)` test?
> 
> -- Ben
> 

It probably could replace that -- E



More information about the swift-evolution mailing list