Hey folks!
Thanks for all the great feedback and discussion.
I really like Tony's suggestion of the opt-in ValueEnumerable protocol.
However, I think Kevin is right that it should be a simple array.
If we wanted to get fancy, we could implement a custom integer indexed
collection that indexed
ug 23, 2017, at 11:18 PM, Logan Shire via swift-evolution <
> swift-evolution@swift.org> wrote:
> >
> > Hey folks!
> >
> > Recently I’ve been working on a small library which leverages the Swift
> 4 Codable protocol
> > and KeyPaths to provide a Swift-y inte
Hey folks!
Recently I’ve been working on a small library which leverages the Swift 4
Codable protocol
and KeyPaths to provide a Swift-y interface to CoreData. (It maps back and
forth between
native, immutable Swift structs and NSManagedObjects). In doing so I found a
couple of
frustrating
You would have this guarantee with the fixed-size arrays currently being
discussed.
Perhaps this could be an amendment to that proposal - you could declare an
array with bounds for its size.
Fixed-size arrays would be a subset of those where the upper and lower bounds
are equal.
They could
pe theory when dealing with generics and protocols,
> but that's just me.
>
>
> Elviro
>
>
> Il giorno 08 ago 2017, alle ore 10:44, Logan Shire via swift-evolution <
> swift-evolution@swift.org> ha scritto:
>
> Thanks for the feedback!
>
> Félix, sorry about the conf
One of my longstanding frustrations with generic types and protocols has been
how hard it is to work with them when their type is unspecified.
Often I find myself wishing that I could write a function that takes a generic
type or protocol as a parameter, but doesn’t care what its generic type