I vote yes. We’ve talked about this for years. This is the right direction for Swift, useful on both its own merits and widely used elsewhere. In terms of naming, both #warning and #error are simple and obvious.

The proposed syntax looks out of step with other build directives. It doesn’t feel Swifty without parentheses. I see I am not alone in this preference.

With regard to feedback about #message , I see no reason to include both warnings and messages. The set of #warning and #error is sufficient in my mind, creating a minimal additive change. Unifying them into a single directive differentiating #emit("warning", "text") and #emit("error", "text") is roughly 500% uglier than #warning and #error , but it would allow future expansion to "message" if that direction would ever arise.

I am hesitant to co-mingle run-time and build-time uses of #warning . Something like nonfatalWarning(_ message: String = "#file:#line warning") or similar could parallel fatalError . (I’m not sure it would add value, but I’d like to throw this into the mix if run-time is a real concern.)