Is there a way to a prevent a String from being interpolated in Swift? <p>I'm experimenting around the idea of a simple logger that would look like this:</p> <pre><code>log(constant: String, _ variable: [String: AnyObject]? = nil) </code></pre> <p>Which would be used like this:</p> <pre><code>log("Something happened", ["error": error]) </code></pre> <p>However I want to prevent misuse of the constant/variable pattern like the following:</p> <pre><code>log("Something happened: \(error)") // `error` should be passed in the `variable` argument </code></pre> <p>Is there a way to make sure that <code>constant</code> wasn't constructed with a string interpolation?</p>