Safe collection subscripting in Swift
Jérôme Alves
415

Hey Jérôme,

So I just have a question. With this method, every time I try getting a value on the SafeCollection, I make a copy of the Collection. Because of initialising the SafeCollection on every access:

public extension Collection {
var safe: SafeCollection<Self> {
return SafeCollection(self)
}
}

Is it right to understand it like that?

Show your support

Clapping shows how much you appreciated Louis Encontre’s story.