My first thoughts are that this seems like a niche use case which probably isn't worth reserving single quotes for (there's still a lot of design work around String
for the future which could probably use them), and that it might be confusing that it doesn't match the Swift definition of a Character
. Could this be handled with a slightly less awkward spelling that isn't as concise, like an instance method with an appropriate name? Or a macro-like #
prefixed function that took a string and converted it into an array of [UInt8]
or similar?
3 Likes