[swift-evolution] [Pitch] #warning
erica at ericasadun.com
Sun May 29 14:58:56 CDT 2016
> On May 29, 2016, at 1:44 PM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
>> On May 28, 2016, at 8:26 PM, Jon Shier via swift-evolution <swift-evolution at swift.org> wrote:
>> I appreciate the sentiment, but I think we should reserve warnings for actual compiler diagnostics.
> +1. The IDE should just pick up "// FIXME: “ comments and summarize them as issues. Xcode already shows them in its jump bar.
> That said, I can see a use for #error, as Charlie shows downthread:
> #if os(OSX)
> /// ...
> #if os(Linux)
> /// ...
> #error("This OS isn't supported yet.").
One could make a weak argument that #warning/#error/#message make a nice family of flexible alerts
just because they're kind of what we're used to already. A possible use case for warning:
#warning("Your UI will look bad. This code works under OS X but this library is intended for iOS-like environments")
#error("Unsupported target GUI")
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution