[swift-evolution] [DRAFT] Aliasing the OS X Platform Configuration Test

David Waite david at alkaline-solutions.com
Thu Jun 16 10:53:31 CDT 2016


> On Jun 16, 2016, at 9:29 AM, Charlie Monroe via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Have you considered just #if os(mac)? I mean the fact that you're testing against "OS" is already expressed. I know it goes against the other values (watchOS, tvOS), but I'd personally drop those as well in favor of simplier os(watch), os(tv).
> 
> This would go along the various Swift 3 improvements where e.g. NSFileManager.defaultManager() became simply FileManager.default (thus dropping the unnecessary "Manager")...
> 
> But I understand if you're against it, considering that these are really trademarks and official OS names…

I would be nervous about this personally, as there is a potential for people to confuse #if os(tv) as some form of class of operating system variants targeting televisions, rather than tvOS specifically.

Plus, it would be hard to be consistent - #if os(iOS) probably shouldn’t become #if os(i) :-)

-DW

> 
> 
>> On Jun 16, 2016, at 4:29 PM, Erica Sadun via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>> Starting in Sierra, Apple's Mac-based OS is renamed to macOS.
>> 
>> All user-facing Swift APIs must go through Swift Evolution. While this is a trivial API change, I have put together a formal proposal as is normal and usual for this process. Here is a draft for public comment.
>> 
>>  -- Erica
>> 
>> Gist:  https://gist.github.com/erica/f53fa6cfef9e5cf17ab139f7528edde2 <https://gist.github.com/erica/f53fa6cfef9e5cf17ab139f7528edde2>
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160616/fb262b74/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160616/fb262b74/attachment.sig>


More information about the swift-evolution mailing list