Strings in Swift 4

(James Froggatt) #1

Regarding the string-collection question, I have some corner-cases which may be worth consideration:

Is it safe to pass a view (EG: String.UTF8View) to a generic function/initialiser over Collections, which either has an inout parameter or stores the result?

I could imagine these situations presenting problems. Though obviously we can't eliminate views entirely, it could at least save an Array conversion for one kind of indexing method.