shortcuts-swift icon indicating copy to clipboard operation
shortcuts-swift copied to clipboard

Revisit variables in string interpolation when Swift 5 is released

Open a2 opened this issue 6 years ago • 0 comments

Currently, variable use in String interpolation is a big hack that encodes the Variable's Attachment value as JSON and is pulled apart into a Dictionary of string and attachmentsByRange by the withInterpolatedText(_:) function.

With SE-0228 in Swift 5, we can have custom types that conform to ExpressibleByStringInterpolation.

a2 avatar Dec 24 '18 16:12 a2