[swift-evolution] [draft] Target environment platform condition
ghoare at apple.com
Thu Oct 26 01:27:02 CDT 2017
Theoretically, sure. I think that would not be congruent with the existing approach of having one platform condition per component of the triple, though (arch, os). Nor would it let one independently test for simulator-ness without concern for the OS (unless we were to introduce yet another notation, such as os(*, simulator)) I think in general it's simplest if we keep it as its own platform condition.
> On Oct 24, 2017, at 11:14 PM, Ben Rimmington <me at benrimmington.com> wrote:
> Could this be an extra parameter for the os() platform condition?
> #if os(iOS, simulator)
> #if os(Android, emulator)
> -- Ben
>> On 25 Oct 2017, at 04:05, Graydon Hoare wrote:
>> I'd like to propose a variant of a very minor, additive proposal Erica Sadun posted last year, that cleans up a slightly messy idiomatic use of conditional compilation in libraries. The effects should be quite limited; I'd call it a "standard library" addition except that the repertoire of compiler-control statements isn't strictly part of the stdlib.
>> Proposal is here: https://gist.github.com/graydon/809af2c726cb1a27af64435e47ef4e5d
>> Implementation (minus fixits) is here: https://github.com/graydon/swift/commit/16493703ea297a1992ccd0fc4d2bcac7d078c982
>> Feedback appreciated,
More information about the swift-evolution