[swift-evolution] [Pitch] Build configuration tests

Ben Rimmington me at benrimmington.com
Mon Apr 24 20:59:34 CDT 2017


> 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



More information about the swift-evolution mailing list