[swift-evolution] OS/Environment check in Swift

Muhammad Mominul Huque Nahid mominul2082 at gmail.com
Sun Aug 21 12:58:30 CDT 2016


I'd like to add two more conditional proposal:

```
osTarget(MSVC)

//or

osEnvironment(Mingw)
```

I have some comments about following conditionals

```
os(Windows, target: MSVC)

// or

os(Windows, environment: MSVC)
```
I don't like these two conditionals. Because these two conditionals will
not fit in for Apple platforms. If we consider those two:

```
os(Apple, target: macOS)
// or
os(Apple, environment: iOS)
```
So we would have to use Apple as main platform and macOS, iOS etc. as its
'environments' or as 'tagets' if we consider that two.

As far now we have these conditionals or I proposed:

```
environment(_)
//or
target(_)
//or
osEnvironment(_)
//or
osTarget(_)
//or
os(_, environment: )
//or
os(_, target: )
```

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160821/8c26f3e4/attachment.html>


More information about the swift-evolution mailing list