> On May 29, 2016, at 1:44 PM, Chris Lattner via swift-evolution
> <[email protected]> wrote:
>
>
>> On May 28, 2016, at 8:26 PM, Jon Shier via swift-evolution
>> <[email protected]> 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)
> /// ...
> #else
> #error("This OS isn't supported yet.").
> #endif
>
> -Chris
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:
#if canImport(Cocoa)
#warning("Your UI will look bad. This code works under OS X but this
library is intended for iOS-like environments")
#elseif !canImport(UIKit)
#error("Unsupported target GUI")
#endif
-- E
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution