[swift-evolution] [META] Re-invigorating the compiler directive discussion
Erica Sadun
erica at ericasadun.com
Mon Mar 14 17:47:01 CDT 2016
> On Mar 14, 2016, at 4:03 PM, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> The use cases for this one are clear to me, you can find many in
> low-level code. I think the majority of the #if's found in the
> standard library are either checks for 32/64 bit, or ObjC/Native
> runtime, or future-proofing checks for endianness.
>
>> * testing for specific platform deployment: https://gist.github.com/erica/103b5cd17bde4171ae0b <https://gist.github.com/erica/103b5cd17bde4171ae0b>
>>
>> -- E, who is still ready and willing to toss the last (platform(Apple)) of these if there's no good use-case motivating it.
>
> It is not that I'm saying that there is no good use case, it is just
> that they are not obvious to me. Here's something I could imagine
> happening:
>
> #if platform(Unix)
> use system()
> #else if platform(Windows)
> use CreateProcessEx
> #else
> #error "unknown platform"
> #endif
>
> But I'm not sure that "Unix-like" and "Windows-like" are precise
> enough to write the kinds of checks you would want to write in
> low-level code.
That's a good enough reason for me to back burner this until someone
has a concrete use.
I'm not deleting it (unless GitHub goes into receivership and shuts down)
but I'm not inclined to present it as a pull request for a full proposal.
Thank you for the feedback, I am going to update and add this bit it in just in case it gets
new life somewhere in the future. So the end result is not so much "toss it" as "defer it".
-- E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160314/d1e5c5d6/attachment.html>
More information about the swift-evolution
mailing list